Skip to content

Commit

Permalink
Stop queue runner if there are no jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kovah committed Jan 30, 2025
1 parent 3f1e484 commit 683c243
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class Kernel extends ConsoleKernel
{
protected function schedule(Schedule $schedule): void
{
$schedule->command('queue:work --queue=default,import --max-jobs=30')->withoutOverlapping();
$schedule->command('queue:work', [
'--queue' => 'default,import',
'--max-jobs' => '30',
'--stop-when-empty',
])->withoutOverlapping();

$schedule->command('links:check')->everyTwoHours()->withoutOverlapping();

Expand Down

0 comments on commit 683c243

Please sign in to comment.