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__":