Closed morellon closed 13 years ago
Thanks! I'm going to rename the method and add a unit test, will be included in the next release.
Scrap that, there is already the ability to define lock_failed
in your job and handle a lock failure.
https://github.com/lantins/resque-lock-timeout/blob/master/lib/resque/plugins/lock_timeout.rb#L95
Sorry about that. I don't remember seeing this method there, my bad.
No worries! I forgot about the hook method myself =)
I've made the hook methods more clear in the code now: https://github.com/lantins/resque-lock-timeout/blob/master/lib/resque/plugins/lock_timeout.rb#L88
Added a method to handle jobs when a lock was already acquired. This would allow, for example, to override the abort_lock method to requeue messages that were not processed (avoiding to lose messages from the queue)