MCPcopy
hub / github.com/celery/celery / add_around

Method add_around

celery/app/task.py:418–424  ·  view source on GitHub ↗
(cls, attr, around)

Source from the content-addressed store, hash-verified

416
417 @classmethod
418 def add_around(cls, attr, around):
419 orig = getattr(cls, attr)
420 if getattr(orig, '__wrapped__', None):
421 orig = orig.__wrapped__
422 meth = around(orig)
423 meth.__wrapped__ = orig
424 setattr(cls, attr, meth)
425
426 def __call__(self, *args, **kwargs):
427 _task_stack.push(self)

Callers 1

annotateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected