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

Add skipLocked config for the database handler #48

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

michalsn
Copy link
Member

@michalsn michalsn commented Sep 18, 2024

Description
This PR adds skipLocked config for the database handler.

Since using a "skip-locked rows" query can be problematic for some users, I decided to introduce a config option for this purpose.

If the developer runs only one instance of the same queue, it will be safe to set skipLocked to false and use it without worrying about the required database version. This is a fair compromise for those who do not use the queue intensively.

Needs: #47

Fixes: #42

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@coveralls
Copy link

coveralls commented Sep 18, 2024

Pull Request Test Coverage Report for Build 10935215757

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.433%

Totals Coverage Status
Change from base Build 10935164404: 0.0%
Covered Lines: 487
Relevant Lines: 557

💛 - Coveralls

@kenjis kenjis added the enhancement New feature or request label Sep 19, 2024
@michalsn michalsn merged commit 0bc2957 into codeigniter4:develop Sep 19, 2024
13 checks passed
@michalsn
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dev: FOR UPDATE SKIP LOCKED issue when retrieving jobs in a queue
3 participants