diff --git a/server/commons/LockManager.coffee b/server/commons/LockManager.coffee index bd0a89171..36936b236 100644 --- a/server/commons/LockManager.coffee +++ b/server/commons/LockManager.coffee @@ -4,7 +4,7 @@ log = require 'winston' class LockManager constructor: -> - unless config.isProduction or config.redis.host isnt "localhost" + unless config.isProduction throw "You shouldn't be instantiating distributed locks unless in production." @redisNotAvailable = true @redisClient = redis.createClient config.redis.port, config.redis.host diff --git a/server/routes/mail.coffee b/server/routes/mail.coffee index 6490b4394..4098402b0 100644 --- a/server/routes/mail.coffee +++ b/server/routes/mail.coffee @@ -8,7 +8,7 @@ LevelSession = require '../levels/sessions/LevelSession' Level = require '../levels/Level' log = require 'winston' sendwithus = require '../sendwithus' -if config.isProduction or config.redis.host isnt "localhost" #TODO: Ask Nick and Scott to change their environment variables and change the deploy ones +if config.isProduction lockManager = require '../commons/LockManager' module.exports.setup = (app) ->