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

Fix duplicate cycles #16

Merged
merged 1 commit into from
Jan 25, 2023
Merged

Fix duplicate cycles #16

merged 1 commit into from
Jan 25, 2023

Conversation

jwright
Copy link
Contributor

@jwright jwright commented Jan 25, 2023

This PR fixes an issue where we would get duplicate current usage trackers.

This was caused by having multiple verbs with the same limit cycles on them.

# products.yml

basic:
  limits:
    foos:
      count: 10
      enforcement: hard
      interval: month
      duration: 1
    bars:
      count: 10
      enforcement: hard
      interval: month
      duration: 1

The Billing::Usage::Tracker.cycles would return duplicate 1 month intervals and that would cause HasTrackers.billing_usage_trackers.current to return duplicate trackers for the single cycle.

Closes #12

@jwright jwright merged commit e191850 into main Jan 25, 2023
@jwright jwright deleted the fix/duplicate-cycles branch January 25, 2023 20:05
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.

Tracker Cycles Returns Duplicate Intervals
1 participant