mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 07:03:37 -05:00
each health check is run with different user_id
means can do a full clean after tests
This commit is contained in:
parent
2b8ca59420
commit
f8e9df9130
1 changed files with 3 additions and 3 deletions
|
@ -12,9 +12,9 @@ db = mongojs(Settings.mongo?.url, ['notifications'])
|
||||||
|
|
||||||
module.exports =
|
module.exports =
|
||||||
check : (callback)->
|
check : (callback)->
|
||||||
user_id = ObjectId(settings.notifications.healthCheck.user_id)
|
user_id = ObjectId()
|
||||||
notification_key = "smoke-test-notification-#{ObjectId()}"
|
notification_key = "smoke-test-notification-#{ObjectId()}"
|
||||||
getOpts = (endPath)-> {url:"http://localhost:#{port}/user/#{user_id}#{endPath}", timeout:3000}
|
getOpts = (endPath)-> {url:"http://localhost:#{port}/user/#{user_id}#{endPath}", timeout:5000}
|
||||||
logger.log user_id:user_id, opts:getOpts(), key:notification_key, user_id:user_id, "Health Check: running"
|
logger.log user_id:user_id, opts:getOpts(), key:notification_key, user_id:user_id, "Health Check: running"
|
||||||
jobs = [
|
jobs = [
|
||||||
(cb)->
|
(cb)->
|
||||||
|
@ -59,4 +59,4 @@ module.exports =
|
||||||
if err?
|
if err?
|
||||||
logger.err err, opts, "Health Check: error cleaning up notification"
|
logger.err err, opts, "Health Check: error cleaning up notification"
|
||||||
return callback(err)
|
return callback(err)
|
||||||
db.notifications.remove {_id:ObjectId(notification_id)}, callback
|
db.notifications.remove {user_id:user_id}, callback
|
||||||
|
|
Loading…
Reference in a new issue