adds USER_CONCURRENCY_LIMIT environment variable
This commit is contained in:
parent
0ea43f61c2
commit
d706d4c59d
|
@ -30,10 +30,10 @@ import { sendErrorToClient } from "./middleware/response/error-generator";
|
||||||
const queue: Request[] = [];
|
const queue: Request[] = [];
|
||||||
const log = logger.child({ module: "request-queue" });
|
const log = logger.child({ module: "request-queue" });
|
||||||
|
|
||||||
/** Maximum number of queue slots for Agnai.chat requests. */
|
|
||||||
const AGNAI_CONCURRENCY_LIMIT = 5;
|
|
||||||
/** Maximum number of queue slots for individual users. */
|
/** Maximum number of queue slots for individual users. */
|
||||||
const USER_CONCURRENCY_LIMIT = 1;
|
const USER_CONCURRENCY_LIMIT = parseInt(process.env.USER_CONCURRENCY_LIMIT ?? "1");
|
||||||
|
/** Maximum number of queue slots for Agnai.chat requests. */
|
||||||
|
const AGNAI_CONCURRENCY_LIMIT = USER_CONCURRENCY_LIMIT * 5;
|
||||||
const MIN_HEARTBEAT_SIZE = parseInt(process.env.MIN_HEARTBEAT_SIZE_B ?? "512");
|
const MIN_HEARTBEAT_SIZE = parseInt(process.env.MIN_HEARTBEAT_SIZE_B ?? "512");
|
||||||
const MAX_HEARTBEAT_SIZE =
|
const MAX_HEARTBEAT_SIZE =
|
||||||
1024 * parseInt(process.env.MAX_HEARTBEAT_SIZE_KB ?? "1024");
|
1024 * parseInt(process.env.MAX_HEARTBEAT_SIZE_KB ?? "1024");
|
||||||
|
|
Loading…
Reference in New Issue