Skip to content

Commit

Permalink
fix: telemetry stopping on shutdown (#9740)
Browse files Browse the repository at this point in the history
TODO also stop in prover node
  • Loading branch information
ludamad authored Nov 5, 2024
1 parent 047a964 commit 23b8d8b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions yarn-project/aztec-node/src/aztec-node/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ export class AztecNodeService implements AztecNode {
await this.p2pClient.stop();
await this.worldStateSynchronizer.stop();
await this.blockSource.stop();
await this.telemetry.stop();
this.log.info(`Stopped`);
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec/src/cli/cmds/start_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const startNode = async (
services.push({ node: nodeServer });

// Add node stop function to signal handlers
signalHandlers.push(node.stop);
signalHandlers.push(node.stop.bind(node));

// Add a PXE client that connects to this node if requested
let pxe: PXE | undefined;
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec/src/cli/cmds/start_prover_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const startProverNode = async (
services.push({ provingJobSource });
}

signalHandlers.push(proverNode.stop);
signalHandlers.push(proverNode.stop.bind(proverNode));

// Automatically start proving unproven blocks
await proverNode.start();
Expand Down
1 change: 1 addition & 0 deletions yarn-project/prover-node/src/prover-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export class ProverNode implements ClaimsMonitorHandler, EpochMonitorHandler, Pr
await Promise.all(Array.from(this.jobs.values()).map(job => job.stop()));
await this.worldState.stop();
await this.coordination.stop();
await this.telemetryClient.stop();
this.log.info('Stopped ProverNode');
}

Expand Down

0 comments on commit 23b8d8b

Please sign in to comment.