File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed
core/src/v3/runEngineWorker Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -220,11 +220,7 @@ class ManagedRunController {
220220
221221 const response = await this . httpClient . heartbeatRun (
222222 this . runFriendlyId ,
223- this . snapshotFriendlyId ,
224- {
225- cpu : 0 ,
226- memory : 0 ,
227- }
223+ this . snapshotFriendlyId
228224 ) ;
229225
230226 if ( ! response . success ) {
Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ export const WorkerApiDequeueResponseBody = DequeuedMessage.array();
7373export type WorkerApiDequeueResponseBody = z . infer < typeof WorkerApiDequeueResponseBody > ;
7474
7575export const WorkerApiRunHeartbeatRequestBody = z . object ( {
76- cpu : z . number ( ) ,
77- memory : z . number ( ) ,
76+ cpu : z . number ( ) . optional ( ) ,
77+ memory : z . number ( ) . optional ( ) ,
7878} ) ;
7979export type WorkerApiRunHeartbeatRequestBody = z . infer < typeof WorkerApiRunHeartbeatRequestBody > ;
8080
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export class WorkloadHttpClient {
4141 this . apiUrl = apiUrl . replace ( / \/ $ / , "" ) ;
4242 }
4343
44- async heartbeatRun ( runId : string , snapshotId : string , body : WorkloadHeartbeatRequestBody ) {
44+ async heartbeatRun ( runId : string , snapshotId : string , body ? : WorkloadHeartbeatRequestBody ) {
4545 return wrapZodFetch (
4646 WorkloadHeartbeatResponseBody ,
4747 `${ this . apiUrl } /api/v1/workload-actions/runs/${ runId } /snapshots/${ snapshotId } /heartbeat` ,
@@ -51,7 +51,7 @@ export class WorkloadHttpClient {
5151 ...this . defaultHeaders ,
5252 "Content-Type" : "application/json" ,
5353 } ,
54- body : JSON . stringify ( body ) ,
54+ body : JSON . stringify ( body ?? { } ) ,
5555 }
5656 ) ;
5757 }
You can’t perform that action at this time.
0 commit comments