From 02dc99de382a6d632e2f6b1789eeb25c4922654e Mon Sep 17 00:00:00 2001 From: Ahmed Hesham Date: Wed, 1 Oct 2025 17:35:59 +0300 Subject: [PATCH] fix global variables not accsessed in filter_jobs function --- filter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filter.py b/filter.py index 0eb9d32..e4d7501 100644 --- a/filter.py +++ b/filter.py @@ -12,6 +12,7 @@ total_fail_empty_response = 0 def filter_jobs(jobs, cv, api_keys, good_fit_jobs): + global total_fail,total_overload,total_fail_overload,total_empty_response,total_fail_empty_response key_number = 0 for i, job in jobs.iterrows(): @@ -90,4 +91,4 @@ def print_stats(): stats = f"""total fail: {total_fail} total empty responses: {total_empty_response} fail: {total_fail_empty_response} Total overloads: {total_overload} fail: {total_fail_overload}""" - print(stats) + logging.warning(stats)