diff --git a/app/Console/Commands/WeeklyInstanceScan.php b/app/Console/Commands/WeeklyInstanceScan.php new file mode 100644 index 000000000..a2560c254 --- /dev/null +++ b/app/Console/Commands/WeeklyInstanceScan.php @@ -0,0 +1,47 @@ + $this->updateInstanceStats($instance), + ); + } + + protected function updateInstanceStats($instance) + { + FetchNodeinfoPipeline::dispatch($instance)->onQueue('intbg'); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 938696a1d..37f9d20b3 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -19,7 +19,6 @@ class Kernel extends ConsoleKernel /** * Define the application's command schedule. * - * @param \Illuminate\Console\Scheduling\Schedule $schedule * * @return void */ @@ -32,6 +31,7 @@ class Kernel extends ConsoleKernel $schedule->command('gc:failedjobs')->dailyAt(3)->onOneServer(); $schedule->command('gc:passwordreset')->dailyAt('09:41')->onOneServer(); $schedule->command('gc:sessions')->twiceDaily(13, 23)->onOneServer(); + $schedule->command('app:weekly-instance-scan')->weeklyOn(2, '4:20')->onOneServer(); if ((bool) config_cache('pixelfed.cloud_storage') && (bool) config_cache('media.delete_local_after_cloud')) { $schedule->command('media:s3gc')->hourlyAt(15); @@ -60,7 +60,7 @@ class Kernel extends ConsoleKernel */ protected function commands() { - $this->load(__DIR__ . '/Commands'); + $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); }