Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

190
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda