kopf
kopf copied to clipboard
Spreading out timer invocations
Keywords
timer
Problem
Hello, how do you recommend spreading out the invocations of hundreds of resources on timers after restart? I was hoping I could set a random sleep for @kopf.on.resume invocations only, to spread them out at startup, then @kopf.timer invocations (on the same function with a delayed start) would be staggered, but it doesn't work that way -- the timers all start at the same time. The only way I have figured out is to put random sleeps on all timer invocations, so after many cycles they end up spread out. Thanks.