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.2] Remove need to release jobs that have been reserved too long #13833

Merged
merged 1 commit into from
Jul 2, 2016
Merged

Conversation

20TRIES
Copy link
Contributor

@20TRIES 20TRIES commented Jun 2, 2016

By making the getNextAvailableJob method pick up jobs that have been reserved too long, you can remove the need to periodically release jobs.

This is quite beneficial as it removes the need for an extra transaction (which sometimes cause locks) and eliminates two extra queries.

This is related to #7046. I also have a couple of other pull requests in mind that are related; these are in separate branches.

@taylorotwell

@GrahamCampbell GrahamCampbell changed the title Remove need to release jobs that have been reserved too long. [5.2] Remove need to release jobs that have been reserved too long Jun 2, 2016
@taylorotwell
Copy link
Member

One thing that is confusing me is in the old method the attempts were being incremented when the jobs that were reserved too long were released. How is that being done now?

@20TRIES
Copy link
Contributor Author

20TRIES commented Jun 6, 2016

Ah, i missed that. From a quick look, i think this should be able to be moved to when the job is initially reserved?

I will take a look at it properly this evening and push any changes with tests for the attempts attribute.

@taylorotwell taylorotwell merged commit c7975cb into laravel:5.2 Jul 2, 2016
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