lantins / resque-lock-timeout

A Resque plugin; adds locking, with optional timeout/deadlock handling to resque jobs.
MIT License
53 stars 20 forks source link

Loner job with a timeout can't be enqueue again if it completes after timeout expiration #14

Closed ssaunier closed 11 years ago

ssaunier commented 11 years ago

I hit this issue in production.

Basically, for a loner job with a timeout of 60 seconds, if the job takes more than 60 seconds to complete, it cannot be enqueued again! I had to manually clear up the locks to unblock some of our users.

Here is a quick patch to make sure that a loner job can be enqueued event if a previous instance of the job did not complete before its timeout.

ssaunier commented 11 years ago

Hi @lantins, Thanks for the quick merge ! :)

lantins commented 11 years ago

No problem @ssaunier. thanks for picking up the bug and submitting a fix.

Version has been bumped and new gem released.