Skip to content

Instantly share code, notes, and snippets.

@gugu
Created February 6, 2017 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gugu/680452f754507ec6bea144a2b257c398 to your computer and use it in GitHub Desktop.
Save gugu/680452f754507ec6bea144a2b257c398 to your computer and use it in GitHub Desktop.
# To reproduce issue, call tasks.leak_channels.delay().get()
from celery import Celery, chord
app = Celery('tasks', broker='pyamqp://guest@localhost//', backend='redis://127.0.0.1/')
@app.task
def add(x, y):
return x + y
@app.task
def tsum(numbers):
return sum(numbers)
@app.task
def leak_channels():
return chord([add.s(5,6), add.s(6,7)])(tsum.s()).id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment