Fix remote instance ping

This commit is contained in:
petitminion 2022-10-27 15:46:01 +00:00 committed by Georg Krause
commit 78c3764cc6
2 changed files with 5 additions and 2 deletions

View file

@ -646,14 +646,17 @@ def check_single_remote_instance_availability(domain):
)
domain.reachable = False
domain.save()
return domain.reachable
if "version" in nodeinfo.keys():
domain.reachable = True
domain.last_successful_contact = datetime.datetime.now()
domain.save()
return domain.reachable
else:
logger.info(
f"Domain {domain.name} is not reacheable at the moment. Setting domain as unreacheable."
)
domain.reachable = False
domain.save()
return domain.reachable