JJMC89 has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1324377?usp=email )

Change subject: maxlag: Remove minimum retry limit from wait cycle
......................................................................

maxlag: Remove minimum retry limit from wait cycle

Respect the configured `max_retries` value without enforcing a minimum.
The new minimum  `max_retries` value is now 3, set by the tests collector.

Bug: T434566
Change-Id: I9c4ee003ad7b78ae1076acda6400da0579dd33b1
---
M pywikibot/data/api/_requests.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  JJMC89: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/data/api/_requests.py b/pywikibot/data/api/_requests.py
index 7939fea..b11b235 100644
--- a/pywikibot/data/api/_requests.py
+++ b/pywikibot/data/api/_requests.py
@@ -1120,8 +1120,9 @@

             if code == 'maxlag':
                 retries += 1
-                if retries > max(5, pywikibot.config.max_retries):
+                if retries > pywikibot.config.max_retries:
                     break
+
                 pywikibot.log('Pausing due to database lag: ' + info)

                 try:

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1324377?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I9c4ee003ad7b78ae1076acda6400da0579dd33b1
Gerrit-Change-Number: 1324377
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to