Skip to content

Commit

Permalink
Fix prune batches command interface check (laravel#35713)
Browse files Browse the repository at this point in the history
The `Prunable` interface I added was renamed to `PrunableBatchRepository` post merge but was not also changed in the command interface check to see if the repository can be pruned.
  • Loading branch information
dmason30 authored and levacic committed Dec 26, 2020
1 parent 09852c9 commit 09ab2a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Queue/Console/PruneBatchesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Carbon\Carbon;
use Illuminate\Bus\BatchRepository;
use Illuminate\Bus\Prunable;
use Illuminate\Bus\PrunableBatchRepository;
use Illuminate\Console\Command;

class PruneBatchesCommand extends Command
Expand Down Expand Up @@ -43,7 +43,7 @@ public function handle()

$repository = $this->laravel[BatchRepository::class];

if ($repository instanceof Prunable) {
if ($repository instanceof PrunableBatchRepository) {
$count = $repository->prune(Carbon::now()->subHours($this->option('hours')));
}

Expand Down

0 comments on commit 09ab2a7

Please sign in to comment.