Skip to content

Commit 928396a

Browse files
committed
A few improvements via the 🐇 review
1 parent 70b16ee commit 928396a

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

packages/cli-v3/src/entryPoints/dev-run-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class DevRunController {
123123
},
124124
});
125125

126-
process.on("SIGTERM", this.sigterm);
126+
process.on("SIGTERM", this.sigterm.bind(this));
127127
}
128128

129129
private async sigterm() {

packages/cli-v3/src/entryPoints/managed-run-worker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,8 @@ const zodIpc = new ZodIpcConnection({
559559
});
560560
}
561561
} finally {
562+
standardHeartbeatsManager.stopHeartbeat();
563+
562564
_execution = undefined;
563565
_isRunning = false;
564566

packages/core/src/v3/heartbeats/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { HeartbeatsManager } from "./types.js";
44
const API_NAME = "heartbeats";
55

66
class NoopHeartbeatsManager implements HeartbeatsManager {
7-
async startHeartbeat(id: string) {
7+
startHeartbeat(id: string) {
88
return;
99
}
1010

11-
async stopHeartbeat() {
11+
stopHeartbeat() {
1212
return;
1313
}
1414

packages/core/src/v3/heartbeats/manager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class StandardHeartbeatsManager implements HeartbeatsManager {
2929
}
3030

3131
startHeartbeat(id: string) {
32+
this.stopHeartbeat();
3233
this.currentAbortController = new AbortController();
3334
this.lastHeartbeatYieldTime = Date.now();
3435

0 commit comments

Comments
 (0)