summaryrefslogtreecommitdiff
path: root/src/leap/soledad/client/_db/blobs/sync.py
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-10-31 06:21:31 -0300
committerVictor Shyba <victor1984@riseup.net>2017-10-31 06:21:31 -0300
commitf1c010fc4119d6348d0bd823e4a9f6da310149bd (patch)
treece23cd1362c886775c5f17199042da8d43dc675f /src/leap/soledad/client/_db/blobs/sync.py
parentc8234da89b198064f1d1f14bec6811c0883e705c (diff)
[style] wrong/missing docs/comments (code review)
Diffstat (limited to 'src/leap/soledad/client/_db/blobs/sync.py')
-rw-r--r--src/leap/soledad/client/_db/blobs/sync.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/leap/soledad/client/_db/blobs/sync.py b/src/leap/soledad/client/_db/blobs/sync.py
index d47033b2..838b87e5 100644
--- a/src/leap/soledad/client/_db/blobs/sync.py
+++ b/src/leap/soledad/client/_db/blobs/sync.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# _blobs.py
+# sync.py
# Copyright (C) 2017 LEAP
#
# This program is free software: you can redistribute it and/or modify
@@ -37,6 +37,11 @@ MAX_WAIT = 60 # In seconds. Max time between retries
@defer.inlineCallbacks
def with_retry(func, *args, **kwargs):
+ """
+ Run func repeatedly until success, as long as the exception raised is
+ a "retriable error". If an exception of another kind is raised by func,
+ the retrying stops and that exception is propagated up the stack.
+ """
retry_wait = 1
retriable_errors = (error.ConnectError, error.ConnectionClosed,
RetriableTransferError,)