mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 21:41:03 +08:00
donated user ignore H&R
This commit is contained in:
@@ -12,14 +12,14 @@ class HitAndRunUpdateStatus extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'hr:update_status {--uid=} {--torrent_id=}';
|
||||
protected $signature = 'hr:update_status {--uid=} {--torrent_id=} {--ignore_time=}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Update H&R status, options: --uid, --torrent_id';
|
||||
protected $description = 'Update H&R status, options: --uid, --torrent_id, --ignore_time';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
@@ -40,11 +40,12 @@ class HitAndRunUpdateStatus extends Command
|
||||
{
|
||||
$uid = $this->option('uid');
|
||||
$torrentId = $this->option('torrent_id');
|
||||
$ignoreTime = $this->option('ignore_time');
|
||||
$rep = new HitAndRunRepository();
|
||||
$result = $rep->cronjobUpdateStatus($uid, $torrentId);
|
||||
$result = $rep->cronjobUpdateStatus($uid, $torrentId, $ignoreTime);
|
||||
$log = sprintf(
|
||||
'[%s], %s, uid: %s, torrentId: %s, result: %s',
|
||||
REQUEST_ID, __METHOD__, $uid, $torrentId, var_export($result, true)
|
||||
'[%s], %s, uid: %s, torrentId: %s, ignoreTime: %s, result: %s',
|
||||
REQUEST_ID, __METHOD__, $uid, $torrentId, $ignoreTime, var_export($result, true)
|
||||
);
|
||||
$this->info($log);
|
||||
do_log($log);
|
||||
|
||||
@@ -28,6 +28,7 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->command('exam:checkout_cronjob')->everyMinute();
|
||||
$schedule->command('backup:cronjob')->everyMinute();
|
||||
$schedule->command('hr:update_status')->everyMinute();
|
||||
$schedule->command('hr:update_status --ignore_time=1')->hourly();
|
||||
$schedule->command('user:delete_expired_token')->dailyAt('04:00');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user