MCPcopy
hub / github.com/celery/celery / __protected_call__

Function __protected_call__

celery/app/trace.py:852–859  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

850 _patched['BaseTask.__call__'] = orig = BaseTask.__call__
851
852 def __protected_call__(self, *args, **kwargs):
853 stack = self.request_stack
854 req = stack.top
855 if req and not req._protected and \
856 len(stack) == 1 and not req.called_directly:
857 req._protected = 1
858 return self.run(*args, **kwargs)
859 return orig(self, *args, **kwargs)
860 BaseTask.__call__ = __protected_call__
861 BaseTask._stackprotected = True

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected