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,13 +972,15 @@ 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
if service.slug != 'haproxy' and setting == 'haproxy_enterprise':
continue continue
try: try:
ServiceSetting.insert( ServiceSetting.insert(
server_id=server.server_id, service=service_name, setting=setting, value=1 server_id=server.server_id, service=service.slug, setting=setting, value=1
).on_conflict_ignore().execute() ).on_conflict_ignore().execute()
except Exception: except Exception:
pass pass