From c7480b49a6637a12b6f669de3b7d06ff97102456 Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Wed, 18 Dec 2024 10:51:46 +0100 Subject: [PATCH] Switch federated search tasks from hourly to daily The tasks can become pretty heavy with a large database and a daily update should be enough for the use cases we observe. --- app/Console/Kernel.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index ec41a312d..be776d984 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -35,9 +35,10 @@ protected function schedule(Schedule $schedule): void } }) ->name('generate-federated-search-index') - // The requests to retrieve the federated search index are sent hourly at 05. - // This should not collide with this job to generate the index. - ->hourlyAt(35) + // The requests to retrieve the federated search index are sent daily at + // 03:05. This should not collide with this job to generate the index. + ->dailyAt('01:35') + ->withoutOverlapping() ->onOneServer(); $schedule @@ -46,10 +47,11 @@ protected function schedule(Schedule $schedule): void ->eachById([UpdateFederatedSearchIndex::class, 'dispatch']); }) ->name('update-federated-search-index') - // The jobs to generate the federated search index are run hourly at 35. + // The jobs to generate the federated search index are run daily at 01:35. // This should not collide with this job to request the index from another // instance. - ->hourlyAt(05) + ->dailyAt('03:05') + ->withoutOverlapping() ->onOneServer(); // Insert scheduled tasks here.