MCPcopy Create free account
hub / github.com/compozy/agh / agentTaskLeaseRecord

Function agentTaskLeaseRecord

internal/cli/task_test.go:3018–3032  ·  view source on GitHub ↗
(status taskpkg.RunStatus)

Source from the content-addressed store, hash-verified

3016}
3017
3018func agentTaskLeaseRecord(status taskpkg.RunStatus) AgentTaskLeaseRecord {
3019 leaseUntil := fixedTestNow.Add(5 * time.Minute)
3020 heartbeatAt := fixedTestNow.Add(time.Minute)
3021 return AgentTaskLeaseRecord{
3022 TaskID: "task-1",
3023 RunID: "run-1",
3024 Status: status,
3025 SessionID: "sess-agent",
3026 ClaimedBy: &taskpkg.ActorIdentity{Kind: taskpkg.ActorKindAgentSession, Ref: "sess-agent"},
3027 ClaimTokenHash: "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3028 LeaseUntil: &leaseUntil,
3029 HeartbeatAt: &heartbeatAt,
3030 CoordinationChannelID: "builders",
3031 }
3032}
3033
3034func taskRunRecord(id string, status taskpkg.RunStatus) TaskRunRecord {
3035 return TaskRunRecord{

Callers 2

agentTaskClaimRecordFunction · 0.85

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected