Closed dcadenas closed 3 years ago
Could we detect whether @delay.respond_to?(:call)
and then treat it as a callable object? This way we avoid converting constant numeric delays into lambdas. Also wouldn't mind adding some agent.delay { ... }
syntactic sugar.
This changes let the user specify a dynamic delay so that any pattern (exponential, random?) can be used. A number is still supported so it's backwards compatible