eliminate month scale for popular searches (takes up too much space in redis)

This commit is contained in:
r888888888
2017-11-10 15:40:10 -08:00
parent 354247e3c7
commit 8458c62e8a
5 changed files with 8 additions and 16 deletions

View File

@@ -1,18 +1,18 @@
# queries reportbooru to find popular post searches
class PopularSearchService
attr_reader :date, :scale
attr_reader :date
def self.enabled?
Danbooru.config.reportbooru_server.present?
end
def initialize(date, scale)
def initialize(date)
if !PopularSearchService.enabled?
raise NotImplementedError.new("the Reportbooru service isn't configured. Popular searches are not available.")
end
@date = date
@scale = scale
@scale = "day"
end
def each_search(limit = 100, &block)