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

Jobs silently fail when lock_ttl is reached and until_and_while_executing strategy is used #862

Open
jeromepl opened this issue Jan 6, 2025 · 0 comments

Comments

@jeromepl
Copy link

jeromepl commented Jan 6, 2025

Describe the bug
When using the :until_and_while_executing strategy, if the lock_ttl is reached, jobs fail without raising an error (but do trigger the unlock_failed reflection).

Expected behavior
If the client-side lock has expired, then I would still expect the job to be executed.
An expired lock should not prevent execution of the job.

Current behavior
What happens when a job's lock_ttl is reached is that the strategy tries to first unlock the client-side lock, but since it doesn't exist it prevents execution the job. locksmith.unlock returns false here:

if locksmith.unlock
# ensure_relocked do
runtime_lock.execute { return yield }
# end
else
reflect(:unlock_failed, item)
end

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

No branches or pull requests

1 participant