Create an R6
object for throttling.
Arguments
- seconds_interval
Positive numeric of length 1, throttling interval. The
poll()
method returnsTRUE
if and only if it was not called in the lastseconds_interval
seconds.
Details
Throttling is a technique that limits how often a function is
called in a given period of time. crew_throttle()
objects support
the throttle
argument of controller methods, which ensures auto-scaling
only happen every seconds_interval
seconds. This helps avoid
overburdening the mirai
dispatcher and other resources.
See also
Other throttle:
crew_class_throttle