scheduler - fix missing custom configs when instances change

This commit is contained in:
florian 2024-01-03 21:22:18 +01:00
parent 37f11eadee
commit d475a4e31e
No known key found for this signature in database
GPG key ID: 93EE47CC3D061500
2 changed files with 7 additions and 3 deletions

View file

@ -5,6 +5,7 @@
- [BUGFIX] Fix issues with the database when upgrading from version 1.5.3 and 1.5.4 to the most recent version
- [BUGFIX] Fix ModSecurity-nginx to make it work with brotli
- [BUGFIX] Remove certbot renew delay causing errors on k8s
- [BUGFIX] Fix missing custom modsec files when BW instances change
- [FEATURE] Add Anonymous reporting feature
- [FEATURE] Add support for fallback Referrer-Policies
- [FEATURE] Add profile page to web ui and the possibility to activate the 2FA

View file

@ -644,6 +644,7 @@ if __name__ == "__main__":
if changes["instances_changed"]:
logger.info("Instances changed, generating ...")
INSTANCES_NEED_GENERATION = True
CONFIGS_NEED_GENERATION = True
CONFIG_NEED_GENERATION = True
NEED_RELOAD = True
@ -652,6 +653,10 @@ if __name__ == "__main__":
if NEED_RELOAD:
CHANGES.clear()
if INSTANCES_NEED_GENERATION:
CHANGES.append("instances")
SCHEDULER.update_instances()
if CONFIGS_NEED_GENERATION:
CHANGES.append("custom_configs")
generate_custom_configs(db.get_custom_configs(), original_path=configs_path)
@ -669,9 +674,7 @@ if __name__ == "__main__":
env = db.get_config()
env["DATABASE_URI"] = db.database_uri
if INSTANCES_NEED_GENERATION:
CHANGES.append("instances")
SCHEDULER.update_instances()
except:
logger.error(
f"Exception while executing scheduler : {format_exc()}",