Send message when host is available
This commit is contained in:
@@ -53,11 +53,10 @@ def check_ping(hosts, fails):
|
|||||||
elif response.success():
|
elif response.success():
|
||||||
if host in fails:
|
if host in fails:
|
||||||
fails.remove(host)
|
fails.remove(host)
|
||||||
|
send_discord_message(f"{host} disponible de nuevo")
|
||||||
logging.info(f"Ping correct: {host}")
|
logging.info(f"Ping correct: {host}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.info(f"Bad ping: {host}")
|
logging.info(f"Bad ping: {host}")
|
||||||
print(e)
|
|
||||||
print(fails)
|
|
||||||
save_status(fails)
|
save_status(fails)
|
||||||
|
|
||||||
def save_status(fails):
|
def save_status(fails):
|
||||||
|
|||||||
Reference in New Issue
Block a user