Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
avipatilpro authored Jun 5, 2021
1 parent 72ebeee commit 3ed6c02
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions WebStreamer/utils/keepalive.py
Original file line number Diff line number Diff line change
@@ -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!')

0 comments on commit 3ed6c02

Please sign in to comment.