Skip to content

Commit

Permalink
Pass the encoded task ID into the runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorial1024 committed Jan 5, 2025
1 parent 5d09e50 commit 304307b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/AsyncTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ public function start(): AsyncTaskStatus

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

// then, specific actions depending on the runtime OS
if (OsInfo::isWindows()) {
Expand Down
2 changes: 1 addition & 1 deletion src/AsyncTaskRunnerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AsyncTaskRunnerCommand extends Command
*
* @var string
*/
protected $signature = 'async:run {task}';
protected $signature = 'async:run {task} {--id=}';

/**
* The console command description.
Expand Down

0 comments on commit 304307b

Please sign in to comment.