Commit 662f1135 authored by Henry Oswald's avatar Henry Oswald
Browse files

throw errors in grunt when checking

parent 0f1389a1
......@@ -209,6 +209,7 @@ module.exports = (grunt) ->
Check the mongodb instance is running and accessible on env var SHARELATEX_MONGO_URL
"""
throw new Error("Can not connect to Mongodb")
return callback(err)
checkRedisConnect: (callback = (error) ->) ->
......@@ -219,7 +220,7 @@ module.exports = (grunt) ->
if !err?
grunt.log.write "OK."
else
throw new Error("hllll")
throw new Error("Can not connect to redis")
return callback()
errorHandler = _.once (err)->
err = "Can not connect to redis"
......@@ -231,5 +232,6 @@ module.exports = (grunt) ->
Check the redis instance is running and accessible on env var SHARELATEX_REDIS_URL
"""
throw new Error("Can not connect to redis")
return callback(err)
rclient.on 'error', errorHandler
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment