-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Allow Lockable to be passed custom column, key, and Postgres advisory lock/unlock function #273
Conversation
bensheldon
commented
Jun 22, 2021
•
edited
Loading
edited
- Eventual intention is working towards locking on the ActiveJob ID rather than the GoodJob Job ID.
- Also supports work of Custom advisory locks to prevent certain jobs from being worked on concurrently? #206.
Hey @bensheldon - thoughts on using a single multi-line string in the |
@reczy I agree that using Arel has the regex problem of "now you have two problems". I have a few reasons to use Arel:
...that being written, I also don't want Arel to be a blocker for people contributing. The sql query is documented in the tests: good_job/spec/lib/good_job/lockable_spec.rb Lines 21 to 41 in e83d274
...but I can better document what's happening in the code itself too. Also, thank you for commenting on this PR. I was a little premature in opening it (I gotta get better at "Draft" PRs) |
… lock/unlock function
|