Skip to content

Commit

Permalink
[5.x] Add missing force option to horizon:clear (#909)
Browse files Browse the repository at this point in the history
* [5.x] Add missing force option to horizon:clear

* Update ClearCommand.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
paras-malhotra and taylorotwell authored Oct 12, 2020
1 parent d6d65a8 commit db89b33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Console/ClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class ClearCommand extends Command
* @var string
*/
protected $signature = 'horizon:clear
{--queue= : The name of the queue to clear}';
{--queue= : The name of the queue to clear}
{--force : Force the operation to run when in production}';

/**
* The console command description.
Expand Down Expand Up @@ -65,7 +66,8 @@ public function handle(RedisJobRepository $jobRepository, QueueManager $manager)
protected function getQueue($connection)
{
return $this->option('queue') ?: $this->laravel['config']->get(
"queue.connections.{$connection}.queue", 'default'
"queue.connections.{$connection}.queue",
'default'
);
}
}

0 comments on commit db89b33

Please sign in to comment.