1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Source: libschedule-ratelimiter-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Uploaders: Niko Tyni <ntyni@debian.org>
Section: perl
Testsuite: autopkgtest-pkg-perl
Priority: optional
Build-Depends: debhelper (>= 10)
Build-Depends-Indep: perl
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libschedule-ratelimiter-perl.git
Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libschedule-ratelimiter-perl.git
Homepage: https://metacpan.org/release/Schedule-RateLimiter
Package: libschedule-ratelimiter-perl
Architecture: all
Depends: ${perl:Depends},
${misc:Depends}
Description: Perl library to prevent events from happening too quickly
Schedule::RateLimiter provides a way to voluntarily restrict how many times a
given action may take place within a specified time frame. Such a tool may be
useful if you have written something which periodically polls some public
resource and want to ensure that you do not overburden that resource with too
many requests.
.
Initially, one might think that solving this problem would be as simple as
sleeping for the number of seconds divided by the number of iterations in
between each event. However, that would only be correct if the event took no
time at all.
.
If you know exactly how much time each event is going to take then you could
build an even more complicated one-liner such as this:
.
sleep( (seconds / iterations) - single_event_time )
|