MCPcopy
hub / github.com/celery/celery / __init__

Method __init__

celery/canvas.py:1566–1579  ·  view source on GitHub ↗
(self, *tasks, **options)

Source from the content-addressed store, hash-verified

1564 return cls(rebuilt_tasks, app=app, **d['options'])
1565
1566 def __init__(self, *tasks, **options):
1567 if len(tasks) == 1:
1568 tasks = tasks[0]
1569 if isinstance(tasks, group):
1570 tasks = tasks.tasks
1571 if isinstance(tasks, abstract.CallableSignature):
1572 tasks = [tasks.clone()]
1573 if not isinstance(tasks, _regen):
1574 # May potentially cause slow downs when using a
1575 # generator of many tasks - Issue #6973
1576 tasks = regen(tasks)
1577 super().__init__('celery.group', (), {'tasks': tasks}, **options
1578 )
1579 self.subtask_type = 'group'
1580
1581 def __call__(self, *partial_args, **options):
1582 return self.apply_async(partial_args, **options)

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

regenFunction · 0.90
cloneMethod · 0.45

Tested by

no test coverage detected