|
|
@@ -1,5 +1,8 @@
|
|
|
Mocha = require "mocha"
|
|
|
Base = require("mocha/lib/reporters/base")
|
|
|
+redis = require("redis-sharelatex")
|
|
|
+settings = require("settings-sharelatex")
|
|
|
+redisCheck = redis.activeHealthCheckRedis(settings.redis.web)
|
|
|
|
|
|
module.exports = HealthCheckController =
|
|
|
check: (req, res, next = (error) ->) ->
|
|
|
@@ -8,6 +11,15 @@ module.exports = HealthCheckController =
|
|
|
mocha.run () ->
|
|
|
path = require.resolve(__dirname + "/../../../../test/smoke/js/SmokeTests.js")
|
|
|
delete require.cache[path]
|
|
|
+
|
|
|
+ checkRedis: (req, res, next)->
|
|
|
+ if redisCheck.isAlive()
|
|
|
+ res.send 200
|
|
|
+ else
|
|
|
+ res.send 500
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
Reporter = (res) ->
|
|
|
(runner) ->
|