diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb7360f..6c641997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## Version 2.9.1 + +### Fix + +- [#194][is_194]: Migrate old schedule stuff to console routes file ([#195][pr_195]) + +[is_194]: https://github.com/JSn1nj4/ElliotDerhay.com/issues/194 + +[pr_195]: https://github.com/JSn1nj4/ElliotDerhay.com/pull/195 + ## Version 2.9.0 ### Updates diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index da485130..00000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,61 +0,0 @@ -command(GithubEventPullCommand::class)->hourly(); - $schedule->command(GithubUserUpdateCommand::class)->weekly(); - $schedule->command(TokenPruneCommand::class)->daily(); - - if (Feature::active(TwitterFeed::class)) { - $schedule->command(TweetPullCommand::class)->hourly(); - $schedule->command(TwitterUserUpdateCommand::class)->weekly(); - } - - $schedule->job(CleanTempStorageJob::class)->weekly(); - $schedule->command(WorkCommand::class, ['--stop-when-empty'])->daily(); - - // reports can run after everything else honestly - $schedule->command(SendWeeklyReportCommand::class) - ->saturdays() - ->at(config('app.schedule.default.weekly_time')); - } - - /** - * Register the commands for the application. - */ - protected function commands(): void - { - $this->load(__DIR__ . '/Commands'); - - require base_path('routes/console.php'); - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index 53ceccdb..78869135 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -8,6 +8,7 @@ return Application::configure(basePath: dirname(__DIR__)) ->withRouting( web: __DIR__ . '/../routes/web.php', + commands: __DIR__ . '/../routes/console.php', health: '/up', then: function (Application $app) { if ($app->environment(['production', 'staging'])) return; diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 00000000..25a6eb8a --- /dev/null +++ b/routes/console.php @@ -0,0 +1,30 @@ +hourly(); +Schedule::command(GithubUserUpdateCommand::class)->weekly(); +Schedule::command(TokenPruneCommand::class)->daily(); + +if (Feature::active(TwitterFeed::class)) { + Schedule::command(TweetPullCommand::class)->hourly(); + Schedule::command(TwitterUserUpdateCommand::class)->weekly(); +} + +Schedule::job(CleanTempStorageJob::class)->weekly(); +Schedule::command(WorkCommand::class, ['--stop-when-empty'])->daily(); + +// reports can run after everything else honestly +Schedule::command(SendWeeklyReportCommand::class) + ->saturdays() + ->at(config('app.schedule.default.weekly_time'));