We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b788fd4 commit 1dc6066Copy full SHA for 1dc6066
src/QueueWorker.php
@@ -289,7 +289,7 @@ protected function shouldQuit(): bool
289
*/
290
protected function maxJobsReached(): bool
291
{
292
- return $this->maxJobs !== null && $this->jobsProcessed >= $this->maxJobs;
+ return !empty($this->maxJobs) && $this->jobsProcessed >= $this->maxJobs;
293
}
294
295
/**
@@ -384,9 +384,7 @@ protected function configureOptions(array $options): void
384
$this->maxExecutionTime = (int) $options['maxExecutionTime'];
385
386
387
- if (isset($options['maxJobs'])) {
388
- $this->maxJobs = (int) $options['maxJobs'];
389
- }
+ $this->maxJobs = $options['maxJobs'] ?? null;
390
391
392
0 commit comments