Skip to content

Conversation

blume0
Copy link
Contributor

@blume0 blume0 commented Jan 24, 2025

Summary

Fixes: #2698

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@JustaSqu1d JustaSqu1d added priority: medium Medium Priority python Pull requests that update Python code labels Jan 24, 2025
blume0 and others added 3 commits January 26, 2025 00:11
The current behaviour of the _loop method (when the reconnect
attribute is set to True) is to have the same ExponentialBackoff
instance for all of its lifetime. A task that has failed n times
over its life-time will thus wait 2**n seconds before retrying, no
matter how many successful instances of happened between the failures.

With this commit, the behaviour is to reset the exponential backoff
after a succesful execution of the task, so that the backoff only
takes place after successive failures.
Signed-off-by: DaBlumer <[email protected]>
Co-authored-by: JustaSqu1d <[email protected]>
Signed-off-by: DaBlumer <[email protected]>
@Lulalaby Lulalaby enabled auto-merge (squash) January 25, 2025 23:11
@Lulalaby Lulalaby merged commit dbd9f1b into Pycord-Development:master Jan 27, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Medium Priority python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tasks] Unexpected backoff behaviour when handling task failure

4 participants