MCPcopy
hub / github.com/celery/celery / __then__

Method __then__

celery/local.py:296–307  ·  view source on GitHub ↗
(self, fun, *args, **kwargs)

Source from the content-addressed store, hash-verified

294 return self.__evaluate__()
295
296 def __then__(self, fun, *args, **kwargs):
297 if self.__evaluated__():
298 return fun(*args, **kwargs)
299 from collections import deque
300 try:
301 pending = object.__getattribute__(self, '__pending__')
302 except AttributeError:
303 pending = None
304 if pending is None:
305 pending = deque()
306 object.__setattr__(self, '__pending__', pending)
307 pending.append((fun, args, kwargs))
308
309 def __evaluated__(self):
310 try:

Callers 2

test_callbacksMethod · 0.95
_connect_signalMethod · 0.80

Calls 4

__evaluated__Method · 0.95
funFunction · 0.85
__getattribute__Method · 0.80
__setattr__Method · 0.45

Tested by 1

test_callbacksMethod · 0.76