mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-08 03:18:28 +03:00
adds retry to worksheet read for slow worksheets
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from gspread import utils
|
||||
from retrying import retry
|
||||
|
||||
|
||||
class GWorksheet:
|
||||
@@ -26,6 +27,12 @@ class GWorksheet:
|
||||
"replaywebpage": "replaywebpage",
|
||||
}
|
||||
|
||||
@retry(
|
||||
wait_incrementing_start=1000,
|
||||
wait_incrementing_increment=3000,
|
||||
wait_incrementing_max=20_000,
|
||||
stop_max_attempt_number=5,
|
||||
)
|
||||
def __init__(self, worksheet, columns=COLUMN_NAMES, header_row=1):
|
||||
self.wks = worksheet
|
||||
self.columns = columns
|
||||
|
||||
Reference in New Issue
Block a user