Skip to content

Commit

Permalink
Fix ClearRequestQueue command for default queue
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcusackie authored Oct 4, 2024
1 parent 91f82b5 commit a572892
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Console/Commands/ClearRequestQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ public function handle()
$queue = config('statamic-cache-requester.queue.name');

try {
Artisan::call("queue:clear {$connection} --queue={$queue} --force");
if($connection == 'default') {
Artisan::call("queue:clear --queue={$queue} --force");
}
else {
Artisan::call("queue:clear {$connection} --queue={$queue} --force");
}

$this->info("{$connection}:{$queue} queue has been cleared");
}
catch(\Throwable $e){
Expand Down

0 comments on commit a572892

Please sign in to comment.