forked from tanner/qotnews
Alert on story update error
This commit is contained in:
@@ -8,6 +8,14 @@ import string
|
||||
|
||||
from bleach.sanitizer import Cleaner
|
||||
|
||||
def alert_tanner(message):
|
||||
try:
|
||||
logger.info('Alerting Tanner: ' + message)
|
||||
params = dict(qotnews=message)
|
||||
requests.get('https://tbot.tannercollin.com/message', params=params, timeout=4)
|
||||
except BaseException as e:
|
||||
logger.error('Problem alerting Tanner: ' + str(e))
|
||||
|
||||
def gen_rand_id():
|
||||
return ''.join(random.choice(string.ascii_uppercase) for _ in range(4))
|
||||
|
||||
|
Reference in New Issue
Block a user