]> git.localhorst.tv Git - alttp.git/commitdiff
upgrade task schedule
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 10 Jul 2025 10:11:22 +0000 (12:11 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 10 Jul 2025 10:11:22 +0000 (12:11 +0200)
app/Console/Kernel.php
routes/console.php

index 88fdf9a4e7c763025055b6565efde2423251201f..cd69f659f2a543eac0242122d3d5a88f07700704 100644 (file)
@@ -7,39 +7,24 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
 
 class Kernel extends ConsoleKernel
 {
-    /**
-     * Define the application's command schedule.
-     *
-     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
-     * @return void
-     */
-    protected function schedule(Schedule $schedule)
-    {
-               $schedule->command('twitch:channel-info')->everyFiveMinutes();
-               $schedule->command('sync:stepladder')->daily();
-               $schedule->command('sync:speedgaming')->everyFiveMinutes();
-               $schedule->command('sync:cabookey')->everyFiveMinutes();
-               $schedule->command('sync:coop-zossy')->everyFiveMinutes();
-               $schedule->command('sync:enemizer')->everyFiveMinutes();
-               $schedule->command('sync:hth')->everyFiveMinutes();
-               $schedule->command('sync:sra')->everyFifteenMinutes();
-               $schedule->command('sync:zsr')->everyFifteenMinutes();
-               $schedule->command('sync:avatars')->everyFiveMinutes();
-               $schedule->command('sync:racetime')->everyFiveMinutes();
-               $schedule->command('discord:episode-subscriptions')->everyMinute();
-               $schedule->command('chat:evaluate 100')->everyMinute();
-               $schedule->command('guessing:clean')->everyFifteenMinutes();
-    }
+       /**
+        * Define the application's command schedule.
+        *
+        * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
+        * @return void
+        */
+       protected function schedule(Schedule $schedule): void {
+               //
+       }
 
-    /**
-     * Register the commands for the application.
-     *
-     * @return void
-     */
-    protected function commands()
-    {
-        $this->load(__DIR__.'/Commands');
+       /**
+        * Register the commands for the application.
+        *
+        * @return void
+        */
+       protected function commands(): void {
+               $this->load(__DIR__.'/Commands');
 
-        require base_path('routes/console.php');
-    }
+               require base_path('routes/console.php');
+       }
 }
index e05f4c9a1b27a35c20ac897b44dfb7a9238ff9b7..e603eddcd1700d4c682b2a29f72829695d67ea0c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
-use Illuminate\Foundation\Inspiring;
-use Illuminate\Support\Facades\Artisan;
+use Illuminate\Support\Facades\Schedule;
 
 /*
 |--------------------------------------------------------------------------
@@ -14,6 +13,33 @@ use Illuminate\Support\Facades\Artisan;
 |
 */
 
-Artisan::command('inspire', function () {
-    $this->comment(Inspiring::quote());
-})->purpose('Display an inspiring quote');
+Schedule::command('twitch:channel-info')->everyFiveMinutes()->runInBackground();
+
+Schedule::command('sync:stepladder')->daily()->runInBackground();
+
+Schedule::everyFiveMinutes()
+       ->runInBackground()
+       ->group(function () {
+               Schedule::command('sync:speedgaming');
+               Schedule::command('sync:cabookey');
+               Schedule::command('sync:coop-zossy');
+               Schedule::command('sync:enemizer');
+               Schedule::command('sync:hth');
+               Schedule::command('sync:nmg-league');
+       });
+
+Schedule::everyFifteenMinutes()
+       ->runInBackground()
+       ->group(function () {
+               Schedule::command('sync:sra');
+               Schedule::command('sync:zsr');
+       });
+
+Schedule::command('sync:avatars')->everyFiveMinutes()->runInBackground();
+Schedule::command('sync:racetime')->everyFiveMinutes()->runInBackground();
+
+Schedule::command('discord:episode-subscriptions')->everyMinute();
+
+Schedule::command('chat:evaluate 100')->everyMinute()->runInBackground();
+
+Schedule::command('guessing:clean')->everyFifteenMinutes();