Skip to content

Commit

Permalink
- added an implementation of the Isolatable interface (#48000)
Browse files Browse the repository at this point in the history
- added isolatableId
  • Loading branch information
rybakihor authored Aug 9, 2023
1 parent 99d004a commit b9cbac1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Illuminate/Queue/Console/RetryBatchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

use Illuminate\Bus\BatchRepository;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Isolatable;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'queue:retry-batch')]
class RetryBatchCommand extends Command
class RetryBatchCommand extends Command implements Isolatable
{
/**
* The console command signature.
Expand Down Expand Up @@ -50,4 +51,14 @@ public function handle()

$this->newLine();
}

/**
* Get the custom mutex name for an isolated command.
*
* @return string
*/
public function isolatableId()
{
return $this->argument('id');
}
}

0 comments on commit b9cbac1

Please sign in to comment.