mirror of
https://github.com/avipatilpro/FileStreamBot.git
synced 2026-01-15 14:22:53 -03:00
Initial Commit
This commit is contained in:
11
WebStreamer/utils/keepalive.py
Normal file
11
WebStreamer/utils/keepalive.py
Normal 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!')
|
||||
Reference in New Issue
Block a user