diff --git a/foca/foca.py b/foca/foca.py index d428430..a249c89 100644 --- a/foca/foca.py +++ b/foca/foca.py @@ -174,6 +174,16 @@ def create_celery_app(self) -> Celery: cnx_app = register_exception_handler(cnx_app) logger.info("Error handler registered.") + # Register MongoDB + if self.conf.db: + cnx_app.app.config.foca.db = register_mongodb( + app=cnx_app.app, + conf=self.conf.db, + ) + logger.info("Database registered.") + else: + logger.info("No database support configured.") + # Create Celery app if self.conf.jobs: celery_app = create_celery_app(cnx_app.app) diff --git a/foca/version.py b/foca/version.py index 1b18390..dc17364 100644 --- a/foca/version.py +++ b/foca/version.py @@ -1,3 +1,3 @@ """Single source of truth for package version.""" -__version__ = '0.11.0' +__version__ = '0.12.0'