Initialize value of this.redisNotAvailable

This commit is contained in:
Michael Schmatz 2014-07-16 19:46:30 -07:00
parent d821e459d1
commit c717e609ea

View file

@ -6,6 +6,7 @@ class LockManager
constructor: -> constructor: ->
unless config.isProduction or config.redis.host isnt "localhost" unless config.isProduction or config.redis.host isnt "localhost"
throw "You shouldn't be instantiating distributed locks unless in production." throw "You shouldn't be instantiating distributed locks unless in production."
@redisNotAvailable = true
@redisClient = redis.createClient config.redis.port, config.redis.host @redisClient = redis.createClient config.redis.port, config.redis.host
@redisClient.on "ready", => @redisClient.on "ready", =>
log.info "Redis ready!" log.info "Redis ready!"