diff --git a/app_urls/fetcher/src/notifier.py b/app_urls/fetcher/src/notifier.py index 8d92292..503c510 100644 --- a/app_urls/fetcher/src/notifier.py +++ b/app_urls/fetcher/src/notifier.py @@ -94,7 +94,7 @@ def notify_telegram_warning(last_hours, channel="WARNING"): # Minimum ratio of processed raw urls if (urls_data_status_dict.get("total") > 0): - if (urls_data_status_dict.get("raw") / urls_data_status_dict.get("total") < MINIMUM_PROCESSED_URLS_RATIO): + if (urls_data_status_dict.get("raw", 0) / urls_data_status_dict.get("total") < MINIMUM_PROCESSED_URLS_RATIO): message += "WARNING - Small ratio of processed raw URLs during the last {} hours: {}\n".format(last_hours, urls_data_status_dict.get("total")) message += "\nURLs per status:\n" for o in urls_data_status: