Setup of documents view

This commit is contained in:
Josako
2024-05-05 20:21:44 +02:00
parent 31250443c2
commit d925477e68
14 changed files with 467 additions and 61 deletions

View File

@@ -0,0 +1,9 @@
def init_celery(celery, app):
celery.conf.update(app.config) # Load all configurations form Flask app including Queue settings
class ContextTask(celery.Task):
def __call__(self, *args, **kwargs):
with app.app_context():
return self.run(*args, **kwargs)
celery.Task = ContextTask