Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using chains inside chord with CELERY_CHORD_PROPAGATES = False #1349

Closed
anh opened this issue May 9, 2013 · 2 comments
Closed

Using chains inside chord with CELERY_CHORD_PROPAGATES = False #1349

anh opened this issue May 9, 2013 · 2 comments

Comments

@anh
Copy link
Contributor

anh commented May 9, 2013

I'm using v3.1.0rc1 and disable CELERY_CHORD_PROPAGATES to meet the use-case
that every tasks in chord will run.

celery.conf.update(CELERY_CHORD_PROPAGATES = False)

This works: ( deliberately introduce type error in add.si(1,"1"))

>>> c = chord([add.si(1,"1"), add.si(2,2)], tsum.si([1,2,3])
>>> result = c()
>>> result.get()
6

But when using chains as chord tasks, this gets hang:

>>> c = chord([add.si(1,"1") | add.si(2,2), add.si(10,10) | add.si(20,20)], tsum.si([1,2,3])
>>> result = c()
>>> result.get()

Broker: redis
Result backend: database

@ask
Copy link
Contributor

ask commented May 14, 2013

Celery 3.1 defines how chord errors are handled, the previous behavior was never documented
and more of an accident since it was never the intention to work that way.

We couldn't change the behavior in a bugfix release so a setting had to be used instead,
but it was never the intention that someone would deliberately disable the new behavior.

The new behavior is there to protect against this sort of issue happening, and the backward compatible setting may be removed. I suggest you find some other way to handle errors here (and I wouldn't mind a proposal if you can invent a nice api for it)

@ask ask closed this as completed May 14, 2013
@adampl
Copy link

adampl commented May 24, 2014

For me, the old behavior seems very useful. In some cases I'd like to be 100% sure the callback would be called, regardless of the header. In fact, I was very annoyed when I learned it doesn't work that way!

This is a key feature to me, so I'm deeply concerned to hear it may become deprecated. I'd very much like to have such option, and I think I'm not alone about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants