From ed11fefbabc61a205449ee448bbf526b6ac563b3 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sat, 19 Apr 2025 11:17:38 +0800 Subject: [PATCH] Refine --- auto_cache.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/auto_cache.py b/auto_cache.py index 9b92bcb..a389a08 100644 --- a/auto_cache.py +++ b/auto_cache.py @@ -64,9 +64,9 @@ def queryallscadarecordsbydate(querydate: str, redis_client: redis.Redis): def queryallscadarecordsbydate_by_url(querydate: str): print(f'queryallscadarecordsbydate_by_url: {querydate}') -try: + try: response = urllib.request.urlopen( - f"http://localhost/queryallrecordsbydate/?querydate={querydate}" + f"http://localhost/queryallscadarecordsbydate/?querydate={querydate}" ) html = response.read().decode("utf-8") @@ -102,7 +102,6 @@ def auto_cache_data_by_url(): queryallrecordsbydate_by_url(str_prev_day) queryallscadarecordsbydate_by_url(str_prev_day) - redis_client.close() if __name__ == "__main__":