mirror of
https://github.com/outline/outline.git
synced 2026-12-02 01:34:47 +03:00
fix: Enforce single process for collaboration
This commit is contained in:
1 parent
9744d5e746
commit
8d343fae6d
2 files changed
+8
-4
No files matched your search
+7
-2
@@ -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") {
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user