celery-batches icon indicating copy to clipboard operation
celery-batches copied to clipboard

Doesn't handle retries

Open nijel opened this issue 5 years ago • 3 comments

The celery batches doesn't do retries, in more detail it's described in https://github.com/celery/celery/issues/1498 with possible workaround.

nijel avatar Oct 09 '18 10:10 nijel

Thanks for filing this, you're correct that this is definitely a missing feature. I don't think it would be too hard to add, but I'm unsure.

The "tracer" in celery-batches is missing quite a bit of functionality, actually. In this case it is missing some of the exception handling of calling the task, see part of Celery's trace_task:

https://github.com/celery/celery/blob/5af199c94f3bf08dfaa93c36c83c2147b5f15639/celery/app/trace.py#L372-L390

vs. Celery-batches' apply_batches_task:

https://github.com/percipient/celery-batches/blob/5e65d4addb378c0c7e9ad24ea2c7974e2be58b47/celery_batches/init.py#L173-L180

clokep avatar Oct 09 '18 11:10 clokep

Another bit which is missing is at least called_directly=False, otherwise retry will not attempt to retry...

nijel avatar Oct 09 '18 12:10 nijel

Looking a bit more about this, we'd have to handle bind=True, I think? Unless there's a way to retry on tasks that don't bind?

clokep avatar Oct 09 '18 21:10 clokep