breamware / sidekiq-batch

Sidekiq Batch Jobs Implementation
MIT License
357 stars 95 forks source link

on_success callback not called after job retried #32

Closed tjwallace closed 4 years ago

tjwallace commented 5 years ago

If a job inside of a batch is retried, the on_complete callback will be fired (before the failed job is retried) but the on_success callback will never fire, even after the failed job is retried successfully.

tjwallace commented 5 years ago

Here is some example code to reproduce the problem. You'll notice the success callbacks are never fired.

github-actions[bot] commented 4 years ago

Stale issue message

rudrakshi2014 commented 4 years ago

If a job inside of a batch is retried, the on_complete callback will be fired (before the failed job is retried) but the on_success callback will never fire, even after the failed job is retried successfully.

Did this issue got resolved? I'm still facing this issue.

jrochkind commented 4 years ago

Hi, if I underestand right, this even had a reproduction script (nice!), and is still not fixed, but was closed just for being stale?

If known bugs don't receive any maintainer attention and are closed for being stale without being fixed, the impression given to someone perusing the project to see it's maintenance status... is that the project is not really being maintained?

I'm not sure if this is an accurate impression or not? I am just perusing the project to get a sense of it's maintenance status.

Reopening the issue, if it is indeed still a problem, might be in order?

davidrichey commented 4 years ago

I realized this is happening for us as well. I started to dig around why it was happening. From what I can tell right now when the complete callback gets called it will alway set the batch event key to true which prevents the complete callback from performing the success callback. I'm hoping to get some more time this weekend to play around and open a PR.

https://github.com/breamware/sidekiq-batch/blob/master/lib/sidekiq/batch.rb#L211

github-actions[bot] commented 4 years ago

Stale issue message