Skip to content

Commit

Permalink
Update rthk.py
Browse files Browse the repository at this point in the history
  • Loading branch information
raileo98 authored Oct 23, 2024
1 parent c546c03 commit 0074e2e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/rthk.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,14 @@ async def get_response(url, timeout=10, mustFetch=True, method='GET', session=se

return response
except Exception as e:
# print(f'[ERROR] 獲取響應失敗,即將重試! url: {url} - 錯誤: {e}')
logging.error(f'[ERROR] 獲取響應失敗,即將重試! url: {url} - 錯誤: {e}')
if e == 'Cannot select a disposable connection to ease the charge':
total_requests -= 1
continue

else:
# print(f'[ERROR] 獲取響應失敗,即將重試! url: {url} - 錯誤: {e}')
logging.error(f'[ERROR] 獲取響應失敗,即將重試! url: {url} - 錯誤: {e}')

except:
exception_type, exception_value, exception_traceback = sys.exc_info()
# print(f'[ERROR] 獲取響應出現未知錯誤,即將重試! url: {url} - 錯誤: {exception_type.__name__} - {exception_value}')
Expand Down

0 comments on commit 0074e2e

Please sign in to comment.