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

Add push to front of rate limit queue. #3069

Merged
merged 4 commits into from
Sep 30, 2021
Merged

Add push to front of rate limit queue. #3069

merged 4 commits into from
Sep 30, 2021

Conversation

dceejay
Copy link
Member

@dceejay dceejay commented Jul 15, 2021

(moved random delay to top to group with other delay types.
Tests and docs to follow

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

This adds (allows) a msg.lifo property . If it exists on a msg for a rate limited queue then it adds it to the front of the queue (unshift) rather than the end so it will be first out (Last In First Out).

This allow building a stack type queue if required - or a push back in case of failure retry type queue.

  • Add tests
  • Enhance Docs

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

(moved random delay to top to group with other delay types.
Tests and docs to follow
@coveralls
Copy link

coveralls commented Jul 15, 2021

Coverage Status

Coverage increased (+0.07%) to 67.662% when pulling ef1b3aa on delay-push-to-front into 66a704a on dev.

@knolleary
Copy link
Member

I can see the value in this - my only concern is msg.lifo is not a very accessible property name, particular when you consider non-English speaking users.

In my mind lifo is like rbe - a technical term that will be familiar to those that know, but not intuitive to those unfamiliar.

If we can think of a better name, then we could get this into 2.0 - otherwise it'll have to wait.

@dceejay
Copy link
Member Author

dceejay commented Jul 16, 2021

How about msg.pushback ?
Or. msg.toFront ?
image

add info to sidebar
add tests
@dceejay dceejay marked this pull request as ready for review July 16, 2021 10:31
@dceejay
Copy link
Member Author

dceejay commented Sep 17, 2021

/easycla

@knolleary knolleary merged commit 7fffc1a into dev Sep 30, 2021
@knolleary knolleary deleted the delay-push-to-front branch September 30, 2021 09:44
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

Successfully merging this pull request may close these issues.

None yet

3 participants