pywikibot

How to disable "Sleeping for N seconds" on PyWikiBot


At Pywikibot's Mediawiki Talk page this question has been asked some 2 years ago already.

The answers there were along the lines "you shouldn't" and maxthrottle isn't the right parameter for that.

For intranet usecases the throttle is mostly counterproductive. Especially when testing the automation the throttle kicks in no matter how low the number of API accesses is. So I'd rather switch if off or set it to a reasonable time of a few millisecs instead of the default 10 seconds.

How can the throttle be set to a different time?


Solution

  • see https://github.com/donkaban/pywiki-bot/blob/master/user-config.py#L159

    # Slow down the robot such that it never makes a second page edit within
    # 'put_throttle' seconds.
    put_throttle = 0
    

    0 looks like a good value