Skip to content

Commit

Permalink
simplify waiting on purge rate limit
Browse files Browse the repository at this point in the history
Change-Id: I5cd7be48712563764439f6bdead6972c34e60f49
  • Loading branch information
JJMC89 committed Jan 28, 2023
1 parent 1b8dfab commit 2ad6c59
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/touch.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,9 @@ def purgepages(self, flush=False):

pywikibot.info('{} pages{} purged'
.format(length, '' if done else ' not'))
if not flush:
delay = 60 + 2
if delay:
pywikibot.info(
f'Waiting {delay} seconds due to purge rate limit')
pywikibot.sleep(0 if config.simulate else delay)
if not flush and not config.simulate:
pywikibot.info('Waiting due to purge rate limit')
pywikibot.sleep(62)


def main(*args: str) -> None:
Expand Down

0 comments on commit 2ad6c59

Please sign in to comment.