diff options
author | Michael Yick <cavemanon@mail.snootgame.xyz> | 2023-02-27 17:50:41 -0600 |
---|---|---|
committer | Michael Yick <cavemanon@mail.snootgame.xyz> | 2023-02-27 17:50:41 -0600 |
commit | 96adb62ce1ab2f75d2b3f51ccad5ae69604c340b (patch) | |
tree | fcf3c7587103e927dfe5c6bb321ff672885ff724 /main.py | |
parent | a241741aa2b70a94a7fb7c19bf8b4fcab5c0158b (diff) | |
download | dilbertRss-96adb62ce1ab2f75d2b3f51ccad5ae69604c340b.tar.gz dilbertRss-96adb62ce1ab2f75d2b3f51ccad5ae69604c340b.tar.bz2 dilbertRss-96adb62ce1ab2f75d2b3f51ccad5ae69604c340b.zip |
main.py is now more reasonable with retriesv1.0.1
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -3,7 +3,6 @@ import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry import bs4 -import time import feedgenerator from datetime import datetime, timedelta from fastapi import FastAPI, Response @@ -24,7 +23,7 @@ async def root(): date = rawDate.strftime('%Y-%m-%d') session = requests.Session() - retry = Retry(connect=3, backoff_factor=0.5) + retry = Retry(connect=10, backoff_factor=0.5) adapter = HTTPAdapter(max_retries=retry) session.mount('http://', adapter) session.mount('https://', adapter) |