From 577606bf17df344e1c5772dee01b36d6fa67b491 Mon Sep 17 00:00:00 2001 From: Yuri Kaspervich Date: Mon, 4 Jan 2016 21:12:09 +0300 Subject: [PATCH] Respect Resque.inline * It doesn't make sense to restrict when Resque.inline is true --- lib/resque-restriction/restriction_job.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/resque-restriction/restriction_job.rb b/lib/resque-restriction/restriction_job.rb index 03a8eb1..14bd86f 100644 --- a/lib/resque-restriction/restriction_job.rb +++ b/lib/resque-restriction/restriction_job.rb @@ -20,6 +20,8 @@ def restrict(options={}) end def before_perform_restriction(*args) + return if Resque.inline? + keys_decremented = [] settings.each do |period, number| key = redis_key(period, *args)