Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Initialize slack at zero seconds
Browse files Browse the repository at this point in the history
The previous value of 1.0 made sense as a percentage. The slack is now a
duration.
  • Loading branch information
stephane-caron committed Apr 27, 2022
1 parent 14dbb21 commit fd8a7c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## Unreleased

### Fixed

- Initialize slack at zero seconds

## [1.0.1] - 2022/04/15

### Changed
Expand Down
2 changes: 1 addition & 1 deletion aiorate/rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, frequency: float, name: str = "rate_limiter"):
self.measured_period = 0.0
self.name = name
self.period = period
self.slack = 1.0
self.slack = 0.0

async def remaining(self) -> float:
"""
Expand Down

0 comments on commit fd8a7c9

Please sign in to comment.