I am trying to connect task2
from task_success
signal
from celery.signals import task_success
from celery import Celery
app = Celery()
@app.task
def task1():
return 't1'
@app.task
def task2():
return 't2'
task_success.connect(task2, sender=task1)
When I run this code, its throwing
TypeError: cannot create weak reference to 'PromiseProxy' object
If remove app.task
decorator for task2, it works perfectly. But why is it unable to connect to celery task?