From 491fc27a3e92bbf2d8dbfa20b7c859113c0abc37 Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Thu, 26 Dec 2024 15:42:56 +0100 Subject: [PATCH] feat: remove Kernel console --- app/Console/Kernel.php | 34 ---------------------------------- routes/console.php | 8 ++++++++ 2 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 app/Console/Kernel.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index f6514ad7..00000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,34 +0,0 @@ -command('lcm:delete-old-unverified-users')->daily(); - - if (app()->environment('production')) { - $schedule->command('lcm:post-article-to-twitter')->everyFourHours(); - $schedule->command('lcm:post-article-to-telegram')->everyFourHours(); - $schedule->command('lcm:send-unverified-mails')->weeklyOn(1, '8:00'); - $schedule->command('sitemap:generate')->daily(); - $schedule->command('lcm:notify-pending-articles')->cron('8 0 */2 * *'); - } - } - - protected function commands(): void - { - $this->load(__DIR__.'/Commands'); - } -} diff --git a/routes/console.php b/routes/console.php index 9af55b33..90d26e8e 100644 --- a/routes/console.php +++ b/routes/console.php @@ -10,6 +10,14 @@ $this->comment(Inspiring::quote()); })->purpose('Display an inspiring quote')->hourly(); +if (app()->environment('production')) { + Schedule::command('lcm:post-article-to-twitter')->everyFourHours(); + Schedule::command('lcm:post-article-to-telegram')->everyFourHours(); + Schedule::command('lcm:send-unverified-mails')->weeklyOn(1, '8:00'); + Schedule::command('lcm:notify-pending-articles')->cron('8 0 */2 * *'); +} + +Schedule::command('lcm:delete-old-unverified-users')->daily(); Schedule::command('sitemap:blog-generate')->dailyAt('01:00'); Schedule::command('sitemap:discussion-generate')->dailyAt('01:10'); Schedule::command('sitemap:generate')->dailyAt('02:00');