Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : Kill pending retry callbacks? #30

Open
KingZee opened this issue Dec 15, 2018 · 0 comments
Open

Feature : Kill pending retry callbacks? #30

KingZee opened this issue Dec 15, 2018 · 0 comments

Comments

@KingZee
Copy link

KingZee commented Dec 15, 2018

Since the default behavior has an incremental delay, this combined with asynchronous promises, usually means after a few promises fail for a few times, they are kept in the stack until the number of retries ends.

This is great, but I'd like to suggest a feature for extreme cases. I have a websocket that receives a lot of events, and some of them might take some processing time that could go up to an hour or two. Could there be a pooling feature to limit the total amount of pending retries? So once the number of promises reaches a maximum, the earliest one gets discarded and so-on.

Or if not possible, maybe just a way to stop retries for a promise depending on the argument that was passed to it, and leave handling them or pooling them depending on each dev's usecase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant