feat: add agent run queue controls
This commit is contained in:
+13
@@ -572,6 +572,8 @@ async function bootstrapUserAuth() {
|
||||
pool,
|
||||
userAuth,
|
||||
tkmindProxy,
|
||||
maxConcurrentRuns: Number(process.env.MEMIND_AGENT_RUN_QUEUE_CONCURRENCY ?? 1),
|
||||
runTimeoutMs: Number(process.env.MEMIND_AGENT_RUN_TIMEOUT_MS ?? 15 * 60 * 1000),
|
||||
});
|
||||
wechatMpService = createWechatMpService({
|
||||
config: WECHAT_MP_CONFIG,
|
||||
@@ -1781,6 +1783,17 @@ api.get('/runtime/status', async (_req, res) => {
|
||||
}
|
||||
try {
|
||||
const status = await tkmindProxy.getRuntimeStatus();
|
||||
const toolQueue = agentRunGateway?.getQueueStatus
|
||||
? await agentRunGateway.getQueueStatus().catch((err) => ({
|
||||
error: err instanceof Error ? err.message : String(err),
|
||||
}))
|
||||
: null;
|
||||
if (toolQueue) {
|
||||
status.toolRuntime = {
|
||||
...(status.toolRuntime ?? {}),
|
||||
queue: toolQueue,
|
||||
};
|
||||
}
|
||||
return res.json({
|
||||
ok: true,
|
||||
timestamp: new Date().toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user