mirror of https://github.com/Aidaho12/haproxy-wi
parent
5d0bb7619b
commit
b24e864a27
|
@ -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():
|
||||||
|
|
Loading…
Reference in New Issue