diff --git a/app/logical/api_limiter.rb b/app/logical/api_limiter.rb index ca2af02dd..0534d1f74 100644 --- a/app/logical/api_limiter.rb +++ b/app/logical/api_limiter.rb @@ -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 diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index b45731727..5f7ea74a2 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -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. diff --git a/config/deploy.rb b/config/deploy.rb index a868261b6..8be25577b 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -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'