Skip to content

Commit 9110c36

Browse files
ludamadMaddiaa0
authored andcommitted
fix: telemetry stopping on shutdown (#9740)
TODO also stop in prover node
1 parent 9c1423a commit 9110c36

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

yarn-project/aztec-node/src/aztec-node/server.ts

+1
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ export class AztecNodeService implements AztecNode {
374374
await this.p2pClient.stop();
375375
await this.worldStateSynchronizer.stop();
376376
await this.blockSource.stop();
377+
await this.telemetry.stop();
377378
this.log.info(`Stopped`);
378379
}
379380

yarn-project/aztec/src/cli/cmds/start_node.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const startNode = async (
100100
services.push({ node: nodeServer });
101101

102102
// Add node stop function to signal handlers
103-
signalHandlers.push(node.stop);
103+
signalHandlers.push(node.stop.bind(node));
104104

105105
// Add a PXE client that connects to this node if requested
106106
let pxe: PXE | undefined;

yarn-project/aztec/src/cli/cmds/start_prover_node.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const startProverNode = async (
8080
services.push({ provingJobSource });
8181
}
8282

83-
signalHandlers.push(proverNode.stop);
83+
signalHandlers.push(proverNode.stop.bind(proverNode));
8484

8585
// Automatically start proving unproven blocks
8686
await proverNode.start();

yarn-project/prover-node/src/prover-node.ts

+1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export class ProverNode implements ClaimsMonitorHandler, EpochMonitorHandler, Pr
171171
await Promise.all(Array.from(this.jobs.values()).map(job => job.stop()));
172172
await this.worldState.stop();
173173
await this.coordination.stop();
174+
await this.telemetryClient.stop();
174175
this.log.info('Stopped ProverNode');
175176
}
176177

0 commit comments

Comments
 (0)