[misc] migrate the health-check to the native mongo driver, drop mongojs

This commit is contained in:
Jakob Ackermann 2020-08-31 10:12:37 +01:00
parent d77834ab55
commit 74a3a95dc6
3 changed files with 121 additions and 663 deletions

View file

@ -11,7 +11,7 @@
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const { ObjectId } = require('mongojs')
const { db, ObjectId } = require('./mongodb')
const request = require('request')
const async = require('async')
const _ = require('underscore')
@ -19,12 +19,6 @@ const settings = require('settings-sharelatex')
const { port } = settings.internal.notifications
const logger = require('logger-sharelatex')
const mongojs = require('mongojs')
const Settings = require('settings-sharelatex')
const db = mongojs(Settings.mongo != null ? Settings.mongo.url : undefined, [
'notifications'
])
module.exports = {
check(callback) {
const user_id = ObjectId()

File diff suppressed because it is too large Load diff

View file

@ -26,7 +26,6 @@
"method-override": "^3.0.0",
"metrics-sharelatex": "^2.6.2",
"mongodb": "^3.6.0",
"mongojs": "^3.1.0",
"node-statsd": "0.1.1",
"request": "^2.88.2",
"settings-sharelatex": "^1.1.0",