Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 22, 2020
1 parent c75549c commit 05e3a1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Console/ClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function handle(RedisJobRepository $jobRepository, QueueManager $manager)
$jobRepository->purge($queue = $this->getQueue($connection));

$count = $manager->connection($connection)->clear($queue);

$this->line('<info>Cleared '.$count.' jobs from the ['.$queue.'] queue</info> ');

return 0;
Expand Down
9 changes: 7 additions & 2 deletions src/Repositories/RedisJobRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,13 @@ public function deleteFailed($id)
*/
public function purge($queue)
{
return $this->connection()->eval(LuaScripts::purge(), 2,
'recent_jobs', 'pending_jobs', config('horizon.prefix'), $queue
return $this->connection()->eval(
LuaScripts::purge(),
2,
'recent_jobs',
'pending_jobs',
config('horizon.prefix'),
$queue
);
}

Expand Down

0 comments on commit 05e3a1c

Please sign in to comment.