Change log: https://roxy-wi.org/changelog.py#6_1_4
pull/334/head
Pavel Loginov 2022-08-15 14:59:38 +03:00
parent 5d0bb7619b
commit b24e864a27
1 changed files with 12 additions and 10 deletions

View File

@ -972,16 +972,18 @@ def update_db_v_6_1_4():
services = Services.select() services = Services.select()
for server in servers: for server in servers:
for service in services: for service in services:
service_name = service.service.lower() settings = ('restart', 'dockerized', 'haproxy_enterprise')
setting = 'restart' for setting in settings:
if service_name == 'keepalived': if service.slug == 'keepalived':
continue continue
try: if service.slug != 'haproxy' and setting == 'haproxy_enterprise':
ServiceSetting.insert( continue
server_id=server.server_id, service=service_name, setting=setting, value=1 try:
).on_conflict_ignore().execute() ServiceSetting.insert(
except Exception: server_id=server.server_id, service=service.slug, setting=setting, value=1
pass ).on_conflict_ignore().execute()
except Exception:
pass
def update_ver(): def update_ver():