lib/sidekiq/limit_fetch/redis.rb in sidekiq-limit_fetch-2.2.5 vs lib/sidekiq/limit_fetch/redis.rb in sidekiq-limit_fetch-2.2.6
- old
+ new
@@ -2,9 +2,12 @@
extend self
# prevent blocking of fetcher
# more bullet-proof and faster (O_O)
# than using Celluloid::IO
+ #
+ # https://github.com/brainopia/sidekiq-limit_fetch/issues/41
+ # explanation of why Future#value is beneficial here
def nonblocking_redis
redis do |redis|
begin
Celluloid::Future.new { yield redis }.value
end