Merge pull request #303 from TheophileDiot/Fix-custom-conf-disappearing

[#294] Fix CUSTOM_CONF_SERVER_HTTP disappearing after 60 minutes (autoconf)
This commit is contained in:
Florian Pitance 2022-10-05 16:15:40 +02:00 committed by GitHub
commit a8f79e58f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -143,6 +143,13 @@ class Config(ApiCaller, ConfigCaller) :
# stop scheduler just in case caller didn't do it
self.stop_scheduler()
# remove old autoconf configs if it exists
if self.__configs:
ret = self.__remove_configs()
if not ret :
success = False
log("CONFIG", "", "removing custom configs failed, configuration will not work as expected...")
# update values
self.__instances = instances
@ -209,13 +216,6 @@ class Config(ApiCaller, ConfigCaller) :
success = False
log("CONFIG", "", "reload failed, configuration will not work as expected...")
# remove autoconf configs
if configs != None :
ret = self.__remove_configs()
if not ret :
success = False
log("CONFIG", "", "removing custom configs failed, configuration will not work as expected...")
return success
def start_scheduler(self) :