MCPcopy Create free account
hub / github.com/celery/celery / push

Method push

celery/utils/threads.py:259–267  ·  view source on GitHub ↗

Push a new item to the stack.

(self, obj)

Source from the content-addressed store, hash-verified

257 return Proxy(_lookup)
258
259 def push(self, obj):
260 """Push a new item to the stack."""
261 rv = getattr(self._local, 'stack', None)
262 if rv is None:
263 # pylint: disable=assigning-non-slot
264 # This attribute is defined now.
265 self._local.stack = rv = []
266 rv.append(obj)
267 return rv
268
269 def pop(self):
270 """Remove the topmost item from the stack.

Callers 12

test_stackMethod · 0.80
test_stackMethod · 0.80
test_destination_forMethod · 0.80
setup_methodMethod · 0.80
test_current_taskMethod · 0.80
on_failureMethod · 0.80
_retry_worker_lostMethod · 0.80
__call__Method · 0.80
push_requestMethod · 0.80

Calls

no outgoing calls

Tested by 8

test_stackMethod · 0.64
test_stackMethod · 0.64
test_destination_forMethod · 0.64
setup_methodMethod · 0.64
test_current_taskMethod · 0.64