MCPcopy
hub / github.com/pallets/flask / __call__

Method __call__

examples/celery/src/task_app/__init__.py:31–33  ·  view source on GitHub ↗
(self, *args: object, **kwargs: object)

Source from the content-addressed store, hash-verified

29def celery_init_app(app: Flask) -> Celery:
30 class FlaskTask(Task):
31 def __call__(self, *args: object, **kwargs: object) -> object:
32 with app.app_context():
33 return self.run(*args, **kwargs)
34
35 celery_app = Celery(app.name, task_cls=FlaskTask)
36 celery_app.config_from_object(app.config["CELERY"])

Callers

nothing calls this directly

Calls 2

app_contextMethod · 0.80
runMethod · 0.80

Tested by

no test coverage detected