2

This is my tasks.py

from celery import Celery

app = Celery('proj', broker='amqp://', backend='amqp://', include=['tasks'])

@app.task()
def task_one():
    return print("task_one")

@app.task()
def task_two(*args):
    return print("task_two")

@app.task(ignore_result=True)
def run_tasks():
    chain = task_one.s() | task_two.s()
    chain()

While I run run_tasks.delay() and revoke the task_id while it is running. Is there a way to revoke the chained tasks?

sandeshdaundkar
  • 883
  • 1
  • 7
  • 14
  • 1
    Does this answer your question? [Celery task chain cancelling?](https://stackoverflow.com/questions/12772556/celery-task-chain-cancelling) – Eduard Sukharev Aug 05 '21 at 17:10

0 Answers0