File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
mongodb_consistent_backup/Oplog/Resolver Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def done(self, done_uri):
7070 else :
7171 raise OperationError ("Unexpected response from resolver thread: %s" % done_uri )
7272
73- def wait (self , max_wait_secs = 6 * 3600 ):
73+ def wait (self , max_wait_secs = 6 * 3600 , poll_secs = 2 ):
7474 if len (self ._pooled ) > 0 :
7575 waited_secs = 0
7676 self ._pool .close ()
@@ -79,11 +79,10 @@ def wait(self, max_wait_secs=6*3600):
7979 try :
8080 for thread_name in self ._pooled :
8181 thread = self ._results [thread_name ]
82- thread .get (2 )
82+ thread .get (poll_secs )
8383 except TimeoutError :
8484 if waited_secs < max_wait_secs :
85- waited_secs += 2
86- continue
85+ waited_secs += poll_secs
8786 else :
8887 raise OperationError ("Waited more than %i seconds for Oplog resolver! I will assume there is a problem and exit" )
8988 self ._pool .terminate ()
You can’t perform that action at this time.
0 commit comments