Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[11.x] Add withoutDelay() to the Queueable trait - #51555

Merged
taylorotwell merged 2 commits into
laravel:11.xfrom
KennedyTedesco:queue
May 24, 2024
Merged

[11.x] Add withoutDelay() to the Queueable trait#51555
taylorotwell merged 2 commits into
laravel:11.xfrom
KennedyTedesco:queue

Conversation

@KennedyTedesco

Copy link
Copy Markdown
Contributor

Some of my jobs have a default delay, but on some specific occasions, I need to dispatch them without delay. So, I find myself doing this a lot:

dispatch((new MyJob($data))->delay(0));

So, I thought about having a shortcut for this:

dispatch((new MyJob($data))->withoutDelay());

I mean, this is just for UX. I'm fine with doing delay(0), but I prefer withoutDelay(). =)

@taylorotwell
taylorotwell merged commit f6f5a95 into laravel:11.x May 24, 2024
@KennedyTedesco
KennedyTedesco deleted the queue branch May 24, 2024 14:24
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