Skip to content

Commit 304307b

Browse files
committed
Pass the encoded task ID into the runner
1 parent 5d09e50 commit 304307b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/AsyncTask.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ public function start(): AsyncTaskStatus
180180

181181
// prepare the runner command
182182
$serializedTask = $this->toBase64Serial();
183-
$baseCommand = "php artisan async:run $serializedTask";
183+
$encodedTaskID = $taskStatus->getEncodedTaskID();
184+
$baseCommand = "php artisan async:run $serializedTask --id='$encodedTaskID'";
184185

185186
// then, specific actions depending on the runtime OS
186187
if (OsInfo::isWindows()) {

src/AsyncTaskRunnerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AsyncTaskRunnerCommand extends Command
1414
*
1515
* @var string
1616
*/
17-
protected $signature = 'async:run {task}';
17+
protected $signature = 'async:run {task} {--id=}';
1818

1919
/**
2020
* The console command description.

0 commit comments

Comments
 (0)