-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
JobLock Plugin - beforePerform behaviour #787
Comments
I wonder if this is related to the changes that were just added with #772. We want to call Are you able to make a PR with this fix? Thanks! |
@evantahler I was wondering if it makes sense to call Cheers |
Sounds like to be maximally flexible, we could always run both steps, but provide metadata about the success of previous steps, so the {
before: "success",
run: "success",
after: "pending"
} This would be a new piece of API, so probably a breaking change to add? So yes, I think I agree it would be nice to call |
Hey,
I found an issue related with
JobLock
Plugin. By default, JobLock re-enqueues a job if its key was already set. If, for some reason, renqueue fails the error will be caught in here:node-resque/src/core/worker.ts
Lines 295 to 314 in 708ea4a
and
afterPerform
stage will be executed anyway. This will causeJobLock
key to be deleted and it will completely break the plugin purpose because it immediately allows other jobs(that share the same key) to be executed concurrently.Possible solutions:
Joblock
beforePerform()
stage to handle any possible errors when re-enqueingRunPlugins('afterPerform')
if job perform wasn't effectively called.Cheers
The text was updated successfully, but these errors were encountered: