Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.4] Return the insertId of released jobs #18288

Merged
merged 1 commit into from
Mar 9, 2017
Merged

Conversation

weotch
Copy link
Contributor

@weotch weotch commented Mar 9, 2017

The InteractsWithQueue trait returns the response from $this->job->release($delay); in it's release() and the DatabaseQueue class returns the inserted id from it's release() method. This allows the inserted id to flow back to a job that manually calls release().

My use case involves wanting to release a job back onto the queue without incrementing it's attempts count. I would use this to manually query the jobs table and decrement the attempts after calling release().

One issue I see with this proposal is that the Job contract describes the release() response as being void, which is violated by this change.

@GrahamCampbell GrahamCampbell changed the title Return the insertId of released jobs [5.4] Return the insertId of released jobs Mar 9, 2017
@taylorotwell taylorotwell merged commit 4a9e589 into laravel:5.4 Mar 9, 2017
@taylorotwell
Copy link
Member

Can you update the contract return type?

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