fix(scheduler): wake agents with assigned todo work

This commit is contained in:
ZacharyZhang-NY committed 2026-04-28 20:16:08 -04:00
1 parent bdfada7549
commit 749ad3a231
3 files changed
+55 -1

No files matched your search

+3 -1
View File
@@ -203,15 +203,17 @@ export function buildAgentHierarchyMethods(
id: string;
name: string;
department: string | null;
heartbeatIntervalSec: number | null;
lastHeartbeatAt: string | null;
}> {
return readAll<{
id: string;
name: string;
department: string | null;
heartbeatIntervalSec: number | null;
lastHeartbeatAt: string | null;
}>(
"select id, name, department, last_heartbeat_at as lastHeartbeatAt from agents where company_id = ? and status not in ('terminated', 'paused', 'pending_approval')",
"select id, name, department, heartbeat_interval_sec as heartbeatIntervalSec, last_heartbeat_at as lastHeartbeatAt from agents where company_id = ? and status not in ('terminated', 'paused', 'pending_approval')",
companyId,
);
},