We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af95f95 commit 70bc254Copy full SHA for 70bc254
1 file changed
diracx-logic/src/diracx/logic/__main__.py
@@ -93,14 +93,15 @@ async def delete_jwk(args):
93
async def cleanup_authdb(args):
94
"""Maintain AuthDB partitions and remove expired flows."""
95
logger.info("Maintaining AuthDB partitions and removing expired flows")
96
- import os
97
98
- from diracx.core.settings import AuthSettings
+ from diracx.core.settings import AuthSettings, FactorySettings
99
from diracx.db.sql import AuthDB
100
from diracx.logic.auth.management import cleanup_expired_data
101
102
settings = AuthSettings()
103
- db_url = os.environ["DIRACX_DB_URL_AUTHDB"]
+ factory_settings = FactorySettings()
+ db_url = factory_settings.sql_dbs.AuthDB
104
+
105
db = AuthDB(db_url)
106
async with db.engine_context():
107
async with db:
0 commit comments