Skip to content

Commit

Permalink
make number of retries a class var
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Jan 28, 2020
1 parent 8fe8158 commit b477217
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion securedrop_client/api_jobs/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ class MetadataSyncJob(ApiJob):
Update source metadata such that new download jobs can be added to the queue.
'''

NUMBER_OF_TIMES_TO_RETRY_AN_API_CALL = 15

def __init__(self, data_dir: str, gpg: GpgHelper) -> None:
super().__init__(remaining_attempts=15)
super().__init__(remaining_attempts=self.NUMBER_OF_TIMES_TO_RETRY_AN_API_CALL)
self.data_dir = data_dir
self.gpg = gpg

Expand Down

0 comments on commit b477217

Please sign in to comment.