MCPcopy Index your code
hub / github.com/pyload/pyload / retry

Method retry

module/plugins/Plugin.py:303–319  ·  view source on GitHub ↗

Retries and begin again from the beginning :param max_tries: number of maximum retries :param wait_time: time to wait in seconds :param reason: reason for retrying, will be passed to fail if max_tries reached

(self, max_tries=3, wait_time=1, reason="")

Source from the content-addressed store, hash-verified

301 raise Fail("temp. offline")
302
303 def retry(self, max_tries=3, wait_time=1, reason=""):
304 """Retries and begin again from the beginning
305
306 :param max_tries: number of maximum retries
307 :param wait_time: time to wait in seconds
308 :param reason: reason for retrying, will be passed to fail if max_tries reached
309 """
310 if 0 < max_tries <= self.retries:
311 if not reason: reason = "Max retries reached"
312 raise Fail(reason)
313
314 self.wantReconnect = False
315 self.setWait(wait_time)
316 self.wait()
317
318 self.retries += 1
319 raise Retry(reason)
320
321 def invalidCaptcha(self):
322 if self.cTask:

Callers 1

resetAccountMethod · 0.95

Calls 4

setWaitMethod · 0.95
waitMethod · 0.95
FailClass · 0.85
RetryClass · 0.85

Tested by

no test coverage detected