mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:41:15 +08:00
FIX: Requests were not being logged correctly
`enable` was defaulting to `nil` which is not what we wanted.
This commit is contained in:
@ -16,15 +16,16 @@ class ApplicationRequest < ActiveRecord::Base
|
||||
include CachedCounting
|
||||
|
||||
def self.disable
|
||||
@enabled = false
|
||||
@disabled = true
|
||||
end
|
||||
|
||||
def self.enable
|
||||
@enabled = true
|
||||
@disabled = false
|
||||
end
|
||||
|
||||
def self.increment!(type, opts = nil)
|
||||
perform_increment!(redis_key(type), opts) if @enabled
|
||||
return if @disabled
|
||||
perform_increment!(redis_key(type), opts)
|
||||
end
|
||||
|
||||
def self.write_cache!(date = nil)
|
||||
|
Reference in New Issue
Block a user