Skip to content

Conversation

Bodom78
Copy link
Contributor

@Bodom78 Bodom78 commented Mar 18, 2016

Resolves issue where possible daemons could process the same record by using the findOneAndUpdate to lock a job record while flagging it as reserved at the same time.

@jenssegers
Copy link
Contributor

Any chance you could write unit tests for this?

@Bodom78
Copy link
Contributor Author

Bodom78 commented Mar 20, 2016

@jenssegers I'm not too familiar with unit testing but I'll give it a go.

@Bodom78
Copy link
Contributor Author

Bodom78 commented Mar 21, 2016

@jenssegers I've added some tests that cover necessary methods.

Testing also showed that the getNextAvailableJobAndReserve method was not returning the updated document so that has been resolved too.

All checks now pass.

@jenssegers jenssegers merged commit cd355cb into mongodb:master Jul 2, 2016
mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
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