If server is not alive update first_checked_at column to now()
This commit is contained in:
pare
e6f82478ea
commit
203f19381a
S'han modificat 1 arxius amb 3 adicions i 3 eliminacions
|
@ -40,11 +40,11 @@ def is_json(myjson):
|
|||
return True
|
||||
|
||||
def get_alive_servers(server):
|
||||
|
||||
|
||||
serv_api = ''
|
||||
serv_soft = ''
|
||||
soft_version = ''
|
||||
|
||||
|
||||
try:
|
||||
|
||||
conn = None
|
||||
|
@ -296,7 +296,7 @@ def get_alive_servers(server):
|
|||
|
||||
if first_checked_at != None:
|
||||
|
||||
cur.execute("UPDATE fediverse SET updated_at=(%s), alive=(%s), first_checked_at=(%s), downs=(%s) where server=(%s)", (now, alive, NULL, downs, server))
|
||||
cur.execute("UPDATE fediverse SET updated_at=(%s), alive=(%s), first_checked_at=(%s), downs=(%s) where server=(%s)", (now, alive, now, downs, server))
|
||||
|
||||
else:
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència