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

POC - Rolling Time Periods #3

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

POC - Rolling Time Periods #3

wants to merge 17 commits into from

Conversation

bonedaddy
Copy link
Collaborator

@bonedaddy bonedaddy commented Aug 18, 2023

notes:

  • basic rolling time periods leveraging BeforeBlock for handling period rollovers

rules.iter_mut().for_each(|rule| {
if rule.flow.is_expired(env.block.time) {
rule.flow.expire(env.block.time, rule.quota.duration);
// is this the correct way to reset the channel value??

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolaslara
Copy link

I like this idea

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

2 participants