MCPcopy
hub / github.com/celery/celery / push

Method push

celery/utils/threads.py:204–212  ·  celery/utils/threads.py::_LocalStack.push

Push a new item to the stack.

(self, obj)

Source from the content-addressed store, hash-verified

202 return Proxy(_lookup)
203
204 def push(self, obj):
205 class="st">""class="st">"Push a new item to the stack."class="st">""
206 rv = getattr(self._local, &class="cm">#x27;stack', None)
207 if rv is None:
208 class="cm"># pylint: disable=assigning-non-slot
209 class="cm"># This attribute is defined now.
210 self._local.stack = rv = []
211 rv.append(obj)
212 return rv
213
214 def pop(self):
215 class="st">"""Remove the topmost item from the stack.

Callers 9

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

Calls

no outgoing calls

Tested by 7

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