mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
fix: [crawler] add exception handing for ping_lacus
This commit is contained in:
parent
482fc21b5e
commit
e35924ec22
1 changed files with 5 additions and 1 deletions
|
@ -1795,7 +1795,11 @@ def ping_lacus():
|
||||||
ping = False
|
ping = False
|
||||||
req_error = {'error': 'Lacus URL undefined', 'status_code': 400}
|
req_error = {'error': 'Lacus URL undefined', 'status_code': 400}
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
ping = lacus.is_up
|
ping = lacus.is_up
|
||||||
|
except:
|
||||||
|
req_error = {'error': 'Failed to connect Lacus URL', 'status_code': 400}
|
||||||
|
ping = False
|
||||||
update_lacus_connection_status(ping, req_error=req_error)
|
update_lacus_connection_status(ping, req_error=req_error)
|
||||||
return ping
|
return ping
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue