MCPcopy
hub / github.com/celery/celery / _freeze_gid

Method _freeze_gid

celery/canvas.py:1806–1816  ·  view source on GitHub ↗

Freeze the group id by the existing task_id or a new UUID.

(self, options)

Source from the content-addressed store, hash-verified

1804 yield res # <-- r.parent, etc set in the frozen result.
1805
1806 def _freeze_gid(self, options):
1807 """Freeze the group id by the existing task_id or a new UUID."""
1808 # remove task_id and use that as the group_id,
1809 # if we don't remove it then every task will have the same id...
1810 options = {**self.options, **{
1811 k: v for k, v in options.items()
1812 if k not in self._IMMUTABLE_OPTIONS or k not in self.options
1813 }}
1814 options['group_id'] = group_id = (
1815 options.pop('task_id', uuid()))
1816 return options, group_id, options.get('root_id')
1817
1818 def _freeze_group_tasks(self, _id=None, group_id=None, chord=None,
1819 root_id=None, parent_id=None, group_index=None):

Callers 3

apply_asyncMethod · 0.95
applyMethod · 0.95
test_group_preparedMethod · 0.80

Calls 3

itemsMethod · 0.45
popMethod · 0.45
getMethod · 0.45

Tested by 1

test_group_preparedMethod · 0.64