Skip to content

Commit

Permalink
enable batch jobs delay for redis queue ⏰ (#41783)
Browse files Browse the repository at this point in the history
[before]
- batch jobs was ignoring delay time when pushing into redis.

[after]
- batch jobs delay time will be considered and stored into redis.
  • Loading branch information
civilcoder55 authored Apr 1, 2022
1 parent c4b1529 commit f0537b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Queue/RedisQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public function bulk($jobs, $data = '', $queue = null)
$this->getConnection()->pipeline(function () use ($jobs, $data, $queue) {
$this->getConnection()->transaction(function () use ($jobs, $data, $queue) {
foreach ((array) $jobs as $job) {
$this->push($job, $data, $queue);
if (isset($job->delay)) {
$this->later($job->delay, $job, $data, $queue);
} else {
$this->push($job, $data, $queue);
}
}
});
});
Expand Down

0 comments on commit f0537b5

Please sign in to comment.