Fix scheduler restarting for no reason when having an external database

This commit is contained in:
Théophile Diot 2023-05-10 13:11:09 -04:00
parent 8a308b1a88
commit 905946463d
No known key found for this signature in database
GPG Key ID: E752C80DB72BB014
1 changed files with 3 additions and 0 deletions

View File

@ -511,6 +511,9 @@ if __name__ == "__main__":
# check if the config have changed since last time
tmp_env = db.get_config()
tmp_env["DATABASE_URI"] = environ.get(
"DATABASE_URI", tmp_env["DATABASE_URI"]
)
if env != tmp_env:
logger.info("Config changed, generating ...")
logger.debug(f"{tmp_env=}")