mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 00:06:16 -04:00
Undo recent changes related to Python upgrade
This changeset undoes the recent changes we tried after the Python 3.13 update as they had no bearing on the SSL cert validation errors. Back to the drawing board! Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -5,6 +5,7 @@ import time
|
||||
from io import StringIO
|
||||
|
||||
import botocore
|
||||
import gevent
|
||||
from boto3 import Session
|
||||
from flask import current_app
|
||||
|
||||
@@ -249,7 +250,7 @@ def get_s3_files():
|
||||
for object_key in object_keys:
|
||||
read_s3_file(bucket_name, object_key, s3res)
|
||||
count = count + 1
|
||||
time.sleep(0.2)
|
||||
gevent.sleep(0.2)
|
||||
except Exception:
|
||||
current_app.logger.exception(
|
||||
f"Trouble reading {object_key} which is # {count} during cache regeneration"
|
||||
@@ -410,7 +411,7 @@ def get_job_from_s3(service_id, job_id):
|
||||
)
|
||||
retries += 1
|
||||
sleep_time = backoff_factor * (2**retries) # Exponential backoff
|
||||
time.sleep(sleep_time)
|
||||
gevent.sleep(sleep_time)
|
||||
continue
|
||||
else:
|
||||
# Typically this is "NoSuchKey"
|
||||
|
||||
Reference in New Issue
Block a user