Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
revoke celery chain eager mode

I am using celery chain in Django project.

For chained tasks, I am using task_postrun signal to revoke all subsequent tasks similar to this.

@task_postrun.connect
def task_postrun_handler(
    signal, sender, task_id, task, retval, state, args, kwargs, **kwds
):
    # do other things first
    if retval != 1:
        task.request.chain[:] = []

So if the task's return value is not 1, then revoke all the subsequent tasks. It works fine.

However, in my test, I run the tasks in eager mode. It does enter the task_postrun_handler, but doesn't have array of chain ( the callbacks is None as well).

In this way, I am not able to terminate the task chains in my test. I tried both in celery 3.1.23 and celery 4.0.2

Thanks for any help.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!