Notify status bot token
This commit is contained in:
@@ -83,7 +83,7 @@ def notify_telegram_warning(last_hours, channel="WARNING"):
|
||||
urls_data_status_dict["total"] = urls_data_status_dict.get("total", 0) + o.get("count")
|
||||
|
||||
MINIMUM_URLS_THRESHOLD = 10
|
||||
MINIMUM_PROCESSED_URLS_RATIO = 0.5
|
||||
MINIMUM_PROCESSED_URLS_RATIO = 0.7
|
||||
|
||||
# Minimum amount of URLs
|
||||
if (urls_data_status_dict.get("total") < MINIMUM_URLS_THRESHOLD):
|
||||
@@ -108,7 +108,7 @@ def notify_telegram_warning(last_hours, channel="WARNING"):
|
||||
.annotate(count=Count('id_url')) \
|
||||
.order_by('id_source__source')
|
||||
|
||||
MINIMUM_SOURCES = 2
|
||||
MINIMUM_SOURCES = 3
|
||||
if (len(urls_data_source) < MINIMUM_SOURCES):
|
||||
message += "WARNING - Very few sources found URLs during the last {} hours".format(last_hours)
|
||||
message += "\nURLs per source:\n"
|
||||
|
||||
Reference in New Issue
Block a user