Xqt added a comment.

  **Implementation idea:**
  The `retry-after` value is already read from response header and stored in 
`throttle.retry_after` attribute of the current `site`.
  
  **`Throttle.get_delay()`:**
  
  - Calculate `current_delay` as the maximum of
    - `writedelay` and `retry_after` value, or
    - `delay` and `retry_after` value
  - If `retry_after` is taken into account, clear it.
  - That's it? Yes that should be sufficient in most cases.
  
  **Advanced features:**
  
  - Instead of using `Throttle.process_multiplicity` which counts the parallel 
processes of the current site, take all parallel processes instead.
  - increase `config.putthrottle` if 429 error was triggered by a write action 
and `config.minthrottle` for read requests.

TASK DETAIL
  https://phabricator.wikimedia.org/T414354

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to