Skip to content

Commit

Permalink
Respect Resque.inline
Browse files Browse the repository at this point in the history
* It doesn't make sense to restrict when Resque.inline is true
  • Loading branch information
yukas committed Jan 4, 2016
1 parent 526bf8d commit 577606b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/resque-restriction/restriction_job.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 577606b

Please sign in to comment.