fix bug with incorrect method call for dalli client
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module ApiLimiter
|
||||
def throttled?(ip_addr)
|
||||
key = "#{ip_addr}:#{Time.now.hour}"
|
||||
MEMCACHE.fetch(key, 1.hour, true) {0}
|
||||
MEMCACHE.fetch(key, 1.hour, :raw => true) {0}
|
||||
MEMCACHE.incr(key).to_i > CurrentUser.user.api_hourly_limit
|
||||
end
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ module Danbooru
|
||||
|
||||
# List of memcached servers
|
||||
def memcached_servers
|
||||
%w(127.0.0.1:11211)
|
||||
%w(localhost:11211)
|
||||
end
|
||||
|
||||
# After a post receives this many comments, new comments will no longer bump the post in comment/index.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set :stages, %w(production staging)
|
||||
set :default_stage, "staging"
|
||||
set :unicorn_env, "staging"
|
||||
set :unicorn_env, defer {stage}
|
||||
require 'capistrano/ext/multistage'
|
||||
|
||||
require 'bundler/capistrano'
|
||||
|
||||
Reference in New Issue
Block a user