Skip to content

[13.x] Respect job delays when bulk pushing to QueueFake - #60916

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
Faiyajz:fix/queue-fake-bulk-delays
Jul 29, 2026
Merged

[13.x] Respect job delays when bulk pushing to QueueFake#60916
taylorotwell merged 1 commit into
laravel:13.xfrom
Faiyajz:fix/queue-fake-bulk-delays

Conversation

@Faiyajz

@Faiyajz Faiyajz commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

QueueFake::bulk() currently pushes every job immediately, regardless of
whether the job defines a #[Delay] attribute or a runtime $delay value.
This differs from the production queue drivers, which respect these delays
during bulk dispatch.

This PR updates QueueFake::bulk() to resolve each job's delay using the same
attribute resolution mechanism as the production drivers. Jobs with a delay
are passed to later(), while jobs without a delay continue to use push().

This keeps bulk dispatch behavior consistent between Queue::fake() and
production queue connections without changing the behavior of non-delayed
jobs. Queue names, payload data, and existing pushed-job assertions remain
unchanged.

Regression tests cover bulk jobs with both #[Delay] attributes and runtime
delays.

@taylorotwell
taylorotwell merged commit af9d320 into laravel:13.x Jul 29, 2026
53 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants