Skip to content

Commit

Permalink
Refactor queue assignment in dispatch function
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia committed May 27, 2024
1 parent 821c8a1 commit 6316865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/async-queue/src/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function dispatch(JobInterface $job, ?int $delay = null, ?int $maxAttempts = nul
$job->setMaxAttempts($maxAttempts);
}

$queue = (fn ($queue) => $this->queue ?? $queue ?? 'default')->call($job, $queue);
$queue ??= (fn () => $this->queue ?? 'default')->call($job);

return ApplicationContext::getContainer()
->get(DriverFactory::class)
Expand Down

0 comments on commit 6316865

Please sign in to comment.