summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorMichael Yick <cavemanon@mail.snootgame.xyz>2023-02-27 17:50:41 -0600
committerMichael Yick <cavemanon@mail.snootgame.xyz>2023-02-27 17:50:41 -0600
commit96adb62ce1ab2f75d2b3f51ccad5ae69604c340b (patch)
treefcf3c7587103e927dfe5c6bb321ff672885ff724 /main.py
parenta241741aa2b70a94a7fb7c19bf8b4fcab5c0158b (diff)
downloaddilbertRss-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-xmain.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/main.py b/main.py
index 4e2ce3f..2293634 100755
--- a/main.py
+++ b/main.py
@@ -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)