fix: Enforce single process for collaboration

This commit is contained in:
Tom Moor committed 2021-08-28 17:30:59 -07:00
1 parent 9744d5e746
commit 8d343fae6d
2 files changed
+8 -4

No files matched your search

+7 -2
View File
@@ -84,8 +84,13 @@ async function start() {
throng({
worker: start,
// The number of workers to run, defaults to the number of CPU's available
count: process.env.WEB_CONCURRENCY || undefined,
// The number of processes to run, defaults to the number of CPU's available
// for the web service, and 1 for collaboration during the beta period.
count: serviceNames.includes("web")
? process.env.WEB_CONCURRENCY || undefined
: serviceNames.includes("collaboration")
? 1
: undefined,
});
if (env.ENABLE_UPDATES !== "false" && process.env.NODE_ENV === "production") {
+1 -2
View File
@@ -28,8 +28,7 @@ export default function init(app: Koa, server: http.Server) {
hocuspocus.handleConnection(ws, ctx.request, documentName);
}
ctx.body = "this is a websocket route";
ctx.response.status = 400;
ctx.response.status = 101;
});
app.use(websocket());