Skip to content

Commit

Permalink
[FIX] [TEST] cluster tool needed changes due to changes on deno for h…
Browse files Browse the repository at this point in the history
…andling signals (#285)
  • Loading branch information
aricart authored Apr 19, 2022
1 parent 0cdf439 commit 0fb9767
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/helpers/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ try {
const pid = `[${s.process.pid}]`;
const cpid = rgb24(pid, s.rgb);
console.log(
`${cpid} ${s.configFile} at nats://${s.hostname}:${s.port} cluster://${s.hostname}:${s.cluster} http://127.0.0.1:${s.monitoring} - store: ${s.config.jetstream.store_dir}`,
`${cpid} ${s.configFile} at nats://${s.hostname}:${s.port} cluster://${s.hostname}:${s.cluster} http://127.0.0.1:${s.monitoring} - store: ${s
.config?.jetstream?.store_dir}`,
);
});

Expand All @@ -71,8 +72,7 @@ try {

async function waitForStop(): Promise<void> {
console.log("control+c to terminate");
const sig = Deno.signal(Deno.Signal.SIGTERM);
for await (const _ of sig) {
sig.dispose();
}
Deno.addSignalListener("SIGTERM", () => {
Deno.exit();
});
}

0 comments on commit 0fb9767

Please sign in to comment.