Keep heartbeat concurrency headroom

This commit is contained in:
Dotta committed 2026-05-01 10:15:21 -05:00
1 parent 5bb53f28ff
commit 7c2d279c5c
3 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -676,7 +676,7 @@ Per-agent schedule fields in `adapter_config`:
- `enabled` boolean
- `intervalSec` integer (minimum 30)
- `maxConcurrentRuns` integer; new agents default to `20`
- `maxConcurrentRuns` integer; new agents default to `20`; scheduler clamps configured values to `1..50`
Scheduler must skip invocation when:
+1 -1
View File
@@ -145,7 +145,7 @@ const MAX_RUN_EVENT_PAYLOAD_OBJECT_KEYS = 100;
const MAX_RUN_EVENT_PAYLOAD_DEPTH = 6;
const HEARTBEAT_MAX_CONCURRENT_RUNS_DEFAULT = AGENT_DEFAULT_MAX_CONCURRENT_RUNS;
const HEARTBEAT_MAX_CONCURRENT_RUNS_MIN = 1;
const HEARTBEAT_MAX_CONCURRENT_RUNS_MAX = 20;
const HEARTBEAT_MAX_CONCURRENT_RUNS_MAX = 50;
const LIVENESS_BOOKKEEPING_ACTIVITY_ACTIONS = [
"environment.lease_acquired",
"environment.lease_released",
+3 -2
View File
@@ -1,5 +1,6 @@
// @vitest-environment node
import { describe, expect, it } from "vitest";
import { AGENT_DEFAULT_MAX_CONCURRENT_RUNS } from "@paperclipai/shared";
import { buildNewAgentRuntimeConfig } from "./new-agent-runtime-config";
describe("buildNewAgentRuntimeConfig", () => {
@@ -10,7 +11,7 @@ describe("buildNewAgentRuntimeConfig", () => {
intervalSec: 300,
wakeOnDemand: true,
cooldownSec: 10,
maxConcurrentRuns: 5,
maxConcurrentRuns: AGENT_DEFAULT_MAX_CONCURRENT_RUNS,
},
});
});
@@ -27,7 +28,7 @@ describe("buildNewAgentRuntimeConfig", () => {
intervalSec: 3600,
wakeOnDemand: true,
cooldownSec: 10,
maxConcurrentRuns: 5,
maxConcurrentRuns: AGENT_DEFAULT_MAX_CONCURRENT_RUNS,
},
});
});