chore: Update SCHEDULER.reload() to include custom log level if available

This commit is contained in:
Théophile Diot 2024-07-26 14:47:24 +01:00
parent d71e4d5b75
commit 3a6bc6736f
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -733,7 +733,7 @@ if __name__ == "__main__":
if RUN_JOBS_ONCE:
# Only run jobs once
if not SCHEDULER.reload(env, changed_plugins=changed_plugins):
if not SCHEDULER.reload(env | {"LOG_LEVEL": getenv("CUSTOM_LOG_LEVEL", env.get("LOG_LEVEL", "notice"))}, changed_plugins=changed_plugins):
LOGGER.error("At least one job in run_once() failed")
else:
LOGGER.info("All jobs in run_once() were successful")