MCPcopy
hub / github.com/celery/celery / __reduce__

Method __reduce__

celery/app/task.py:435–443  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

433 _task_stack.pop()
434
435 def __reduce__(self):
436 # - tasks are pickled into the name of the task only, and the receiver
437 # - simply grabs it from the local registry.
438 # - in later versions the module of the task is also included,
439 # - and the receiving side tries to import that module so that
440 # - it will work even if the task hasn't been registered.
441 mod = type(self).__module__
442 mod = mod if mod and mod in sys.modules else None
443 return (_unpickle_task_v2, (self.name, mod), None)
444
445 def run(self, *args, **kwargs):
446 """The body of the task executed by workers."""

Callers 1

test_reduce_directMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_reduce_directMethod · 0.76