Schools NL tuples, traceback on notify err
This commit is contained in:
@@ -4,6 +4,7 @@ from ..models import Urls, Source, Search, UrlContent, UrlsSourceSearch, UrlsDup
|
||||
from django.db.models import Count
|
||||
import requests
|
||||
import os
|
||||
import traceback
|
||||
from .logger import get_logger
|
||||
logger = get_logger()
|
||||
|
||||
@@ -57,7 +58,7 @@ def notify_telegram_info(last_hours, channel="INFO"):
|
||||
# POST
|
||||
response = requests.post(url, params=params)
|
||||
except Exception as e:
|
||||
logger.info("Exception while notifying status: {}".format(str(e)))
|
||||
logger.info("Exception while notifying status: {}\n{}".format(str(e), traceback.format_exc()))
|
||||
|
||||
|
||||
def notify_telegram_warning(last_hours, channel="WARNING"):
|
||||
@@ -142,7 +143,7 @@ def notify_telegram_warning(last_hours, channel="WARNING"):
|
||||
# POST
|
||||
response = requests.post(url, params=params)
|
||||
except Exception as e:
|
||||
logger.info("Exception while notifying status: {}".format(str(e)))
|
||||
logger.info("Exception while notifying status: {}\n{}".format(str(e)), traceback.format_exc())
|
||||
|
||||
|
||||
def notify_telegram(last_hours=12):
|
||||
|
||||
Reference in New Issue
Block a user