flask - Is there a way to receive a notification as soon as a certain task with a certain task id is successful or fails using Celery for Python? -


i want know if there way monitor whether or not task completes or fails using python celery. have event want fire based on results of task.

you can run task celery @shared_task try except block inside:

@shared_task def my_task(input1, input2, ...):     setting up...     try:         stuff         fire_success_event() <- success event     except exception:         above stuff failed         fire_fail_event() <- fail event         return 1 <- fail     return 0 <- success 

good luck :)


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -