mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
/status does not return a 500 HTTP code if docWorkerRegistered fails (#928)
This commit is contained in:
parent
e28e1616ac
commit
a8a421c833
@ -474,7 +474,12 @@ export class FlexServer implements GristServer {
|
|||||||
// be checked with the 'redis' parameter (the user may want to avoid
|
// be checked with the 'redis' parameter (the user may want to avoid
|
||||||
// removing workers when connection is unstable).
|
// removing workers when connection is unstable).
|
||||||
if (this._docWorkerMap.getRedisClient()?.connected) {
|
if (this._docWorkerMap.getRedisClient()?.connected) {
|
||||||
checks.set('docWorkerRegistered', asyncCheck(this._docWorkerMap.isWorkerRegistered(this.worker)));
|
checks.set('docWorkerRegistered', asyncCheck(
|
||||||
|
this._docWorkerMap.isWorkerRegistered(this.worker).then(isRegistered => {
|
||||||
|
if (!isRegistered) { throw new Error('doc worker not registered'); }
|
||||||
|
return isRegistered;
|
||||||
|
})
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isParameterOn(req.query.ready)) {
|
if (isParameterOn(req.query.ready)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user