Skip to content

Commit 704b1f9

Browse files
authored
Merge pull request #499 from NillionNetwork/feat/api-heartbeats2
feat: propagate heartbeat config to nilcc-agent
2 parents 6df0d65 + 78771f0 commit 704b1f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nilcc-api/src/clients/nilcc-agent.client.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import z from "zod";
33
import { AgentCreateWorkloadError, AgentRequestError } from "#/common/errors";
44
import type { MetalInstanceEntity } from "#/metal-instance/metal-instance.entity";
55
import type { DockerCredentials } from "#/workload/workload.dto";
6-
import type { WorkloadEntity } from "#/workload/workload.entity";
6+
import type {
7+
WorkloadEntity,
8+
WorkloadHearbeat,
9+
} from "#/workload/workload.entity";
710

811
const ALLOWED_CREATE_WORKLOAD_ERRORS: string[] = [
912
"DOCKER_COMPOSE",
@@ -104,6 +107,7 @@ export class DefaultNilccAgentClient implements NilccAgentClient {
104107
gpus: workload.gpus,
105108
diskSpaceGb: workload.disk,
106109
domain,
110+
heartbeat: workload.heartbeat,
107111
};
108112
try {
109113
await this.post(url, request, metalInstance);
@@ -288,6 +292,7 @@ type CreateWorkloadRequest = {
288292
gpus: number;
289293
diskSpaceGb: number;
290294
domain: string;
295+
heartbeat?: WorkloadHearbeat;
291296
};
292297

293298
type ActionRequest = {

0 commit comments

Comments
 (0)