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

rules: properly track rate limits of rules #2297

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

Exirel
Copy link
Contributor

@Exirel Exirel commented Jun 5, 2022

Description

Fix #2295 by switching from a scalar object (tuple of datetime and return value) to the RuleMetrics object, which can tell if the rule is limited or not based on the internal state.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

I had to deactivate the "admin" thing locally to test it live, and it works!

@Exirel Exirel added the Bugfix Generally, PRs that reference (and fix) one or more issue(s) label Jun 5, 2022
@Exirel Exirel added this to the 8.0.0 milestone Jun 5, 2022
@Exirel Exirel marked this pull request as ready for review June 5, 2022 16:51
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

This looks simple enough. Do you expect merging this to cause any conflicts in #2290?

@Exirel
Copy link
Contributor Author

Exirel commented Jun 6, 2022

Nope, or if any, only very minor and easy to fix conflicts.

@dgw dgw merged commit df465a7 into sopel-irc:master Jun 6, 2022
@dgw
Copy link
Member

dgw commented Jun 6, 2022

I :shipit: then. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rate limiting is not updated until after the handler returns
2 participants