Initial Commit

This commit is contained in:
Avishkar Patil
2021-06-05 11:56:44 +05:30
committed by GitHub
parent 72ebeeecca
commit 3ed6c02e7e

View File

@@ -0,0 +1,11 @@
# Bot Sleeping
import logging
import requests
from ..vars import Var
def ping_server():
k = requests.get(f'https://ping-pong-sn.herokuapp.com/pingback?link={Var.URL}').json()
if not k.get('error'):
logging.info('KeepAliveService: Pinged {} with status {}'.format(Var.FQDN, k.get('Status')))
else:
logging.error('Couldn\'t Ping the Server!')