mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
throw errors in grunt when checking
This commit is contained in:
parent
2443aa9e75
commit
1e81ab7bef
1 changed files with 3 additions and 1 deletions
|
@ -209,6 +209,7 @@ module.exports = (grunt) ->
|
||||||
Check the mongodb instance is running and accessible on env var SHARELATEX_MONGO_URL
|
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)
|
return callback(err)
|
||||||
|
|
||||||
checkRedisConnect: (callback = (error) ->) ->
|
checkRedisConnect: (callback = (error) ->) ->
|
||||||
|
@ -219,7 +220,7 @@ module.exports = (grunt) ->
|
||||||
if !err?
|
if !err?
|
||||||
grunt.log.write "OK."
|
grunt.log.write "OK."
|
||||||
else
|
else
|
||||||
throw new Error("hllll")
|
throw new Error("Can not connect to redis")
|
||||||
return callback()
|
return callback()
|
||||||
errorHandler = _.once (err)->
|
errorHandler = _.once (err)->
|
||||||
err = "Can not connect to redis"
|
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
|
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)
|
return callback(err)
|
||||||
rclient.on 'error', errorHandler
|
rclient.on 'error', errorHandler
|
||||||
|
|
Loading…
Reference in a new issue