alla flaggor
buster  ] [  bullseye  ] [  bookworm  ] [  trixie  ] [  sid  ]
[ Källkod: libschedule-ratelimiter-perl  ]

Paket: libschedule-ratelimiter-perl (0.01-2)

Länkar för libschedule-ratelimiter-perl

Screenshot

Debianresurser:

Hämta källkodspaketet libschedule-ratelimiter-perl:

Ansvariga:

Externa resurser:

Liknande paket:

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 )

Märken: Software Development: Perl Development, Bibliotek, Implemented in: Perl, Role: Shared Library

Andra paket besläktade med libschedule-ratelimiter-perl

  • beror
  • rekommenderar
  • föreslår
  • enhances

Hämta libschedule-ratelimiter-perl

Hämtningar för alla tillgängliga arkitekturer
Arkitektur Paketstorlek Installerad storlek Filer
all 9,4 kbyte27,0 kbyte [filförteckning]