mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 16:19:02 +02:00
Merge pull request #3682 from overleaf/bg-check-maintenance-file
check maintenance file periodically to close site GitOrigin-RevId: 8e29f40a23df96198c6e4603ede2bab852b98740
This commit is contained in:
@@ -10,8 +10,14 @@ const {
|
||||
|
||||
module.exports = {
|
||||
check(req, res, next) {
|
||||
// detach from express for cleaner stack traces
|
||||
setTimeout(() => runSmokeTestsDetached(req, res).catch(next))
|
||||
if (!settings.siteIsOpen || !settings.editorIsOpen) {
|
||||
// always return successful health checks when site is closed
|
||||
res.contentType('application/json')
|
||||
res.sendStatus(200)
|
||||
} else {
|
||||
// detach from express for cleaner stack traces
|
||||
setTimeout(() => runSmokeTestsDetached(req, res).catch(next))
|
||||
}
|
||||
},
|
||||
|
||||
checkActiveHandles(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user