Mosquito::RateLimiter::ClassMethods
Instance methods
rate_limit_stats
Statistics about the rate limiter, including both the configuration parameters and the run counts.
throttle(*, limit : Int32 = 1, per : Time::Span = 1.second, increment = 1, key = self.name.underscore)
Configures rate limiting for this job.
limit and per are used to control the run count and the window
duration. Defaults to a limit of 1 run per second.
increment is used to indicate how many "hits" against a single job is
worth. Defaults to 1.
key is used to combine rate limiting functions across multiple jobs.