From dd4b6f5bb0c6249914e2c01a9d6e4af194b5afde Mon Sep 17 00:00:00 2001 From: igor_rybak Date: Wed, 9 Aug 2023 01:00:59 +0300 Subject: [PATCH] - added an implementation of the Isolatable interface - added isolatableId --- src/Illuminate/Queue/Console/RetryBatchCommand.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/Console/RetryBatchCommand.php b/src/Illuminate/Queue/Console/RetryBatchCommand.php index 87ee5dbaf2fb..f4af6c3a47bd 100644 --- a/src/Illuminate/Queue/Console/RetryBatchCommand.php +++ b/src/Illuminate/Queue/Console/RetryBatchCommand.php @@ -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. @@ -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'); + } }