MCPcopy
hub / github.com/celery/celery / _get_app

Method _get_app

celery/canvas.py:2351–2362  ·  view source on GitHub ↗
(self, body=None)

Source from the content-addressed store, hash-verified

2349 return self._get_app(self.body)
2350
2351 def _get_app(self, body=None):
2352 app = self._app
2353 if app is None:
2354 try:
2355 tasks = self.tasks.tasks # is a group
2356 except AttributeError:
2357 tasks = self.tasks
2358 if tasks:
2359 app = tasks[0]._app
2360 if app is None and body is not None:
2361 app = body._app
2362 return app if app is not None else current_app
2363
2364 tasks = getitem_property('kwargs.header', 'Tasks in chord header.')
2365 body = getitem_property('kwargs.body', 'Body task of chord.')

Callers 4

apply_asyncMethod · 0.95
runMethod · 0.95
appMethod · 0.95

Calls

no outgoing calls