Skip to content

Commit

Permalink
Merge pull request #706 from biigle/patch-1
Browse files Browse the repository at this point in the history
Improve handling and configuration of GenerateFederatedSearchIndex job
  • Loading branch information
mzur authored Nov 29, 2023
2 parents 19311de + 7b5903f commit aca6db7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ protected function schedule(Schedule $schedule): void
$schedule
->call(function () {
if (FederatedSearchInstance::withLocalToken()->exists()) {
GenerateFederatedSearchIndex::dispatch();
GenerateFederatedSearchIndex::dispatch()
->onQueue(config('biigle.federated_search.index_queue'));
}
})
->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(55)
->hourlyAt(35)
->onOneServer();

$schedule
Expand Down
5 changes: 5 additions & 0 deletions config/biigle.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
| Cache key to use for the federated search index.
*/
'cache_key' => env('BIIGLE_FEDERATED_SEARCH_CACHE_KEY', 'federated_search_index'),

/*
| The queue to submit the "generate federated search index" job to.
*/
'index_queue' => env('BIIGLE_FEDERATED_SEARCH_INDEX_QUEUE', 'default'),
],

];

0 comments on commit aca6db7

Please sign in to comment.