diff --git a/app/models/application_request.rb b/app/models/application_request.rb index 041741fc5..8f146f10f 100644 --- a/app/models/application_request.rb +++ b/app/models/application_request.rb @@ -22,7 +22,8 @@ class ApplicationRequest < ActiveRecord::Base def self.increment!(type, opts=nil) key = redis_key(type) val = $redis.incr(key).to_i - $redis.expire key, 3.days + # 3.days, see: https://github.com/rails/rails/issues/21296 + $redis.expire(key, 259200) autoflush = (opts && opts[:autoflush]) || self.autoflush if autoflush > 0 && val >= autoflush