Skip to content

Groups in a chord throw exception #1509

@malnahlawi

Description

@malnahlawi
from celery import Celery

celery = Celery()
celery.config_from_object({
    'CELERY_RESULT_BACKEND': 'redis://localhost:6379'
})
from celery import chord, group, task

@task
def test():
    return True

c = chord([group(test.si(), test.si()), group(test.si(), test.si())])(group(test.si()))
c.get()

The tasks succeed. The groups throw the following exception:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/celery-3.0.21-py2.7.egg/celery/task/trace.py", line 277, in trace_task
    on_chord_part_return(task)
  File "/Library/Python/2.7/site-packages/celery-3.0.21-py2.7.egg/celery/backends/base.py", line 503, in  on_chord_part_return
    if val >= len(deps):
TypeError: object of type 'NoneType' has no len()

Granted, the two groups can be rewritten as a single group. it makes it a little harder for composition though. If every application has to rewrite, it would be nice for the framework to do so.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions