| 31 | |
| 32 | def celery_init_app(app: Flask) -> Celery: |
| 33 | class FlaskTask(Task): |
| 34 | def __call__(self, *args: object, **kwargs: object) -> object: |
| 35 | with app.app_context(): |
| 36 | return self.run(*args, **kwargs) |
| 37 | |
| 38 | celery_app = Celery(app.name, task_cls=FlaskTask) |
| 39 | celery_app.config_from_object(app.config["CELERY"]) |
nothing calls this directly
no outgoing calls
no test coverage detected