Freeze the group id by the existing task_id or a new UUID.
(self, options)
| 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): |