Skip to content

Commit

Permalink
Remove debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
patuwwy committed Feb 21, 2024
1 parent 2a73c90 commit a05c64f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/runner/src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class Runner<X extends AppConfig> implements IComponent {

if (timeout) {
this.monitoringMessageReplyTimeout = setTimeout(async () => {
this.logger.warn("Monitoring Reply Timeout. Connected");
this.logger.warn("Monitoring Reply Timeout");

await this.handleDisconnect();
}, timeout);
Expand All @@ -324,7 +324,7 @@ export class Runner<X extends AppConfig> implements IComponent {

try {
await this.hostClient.disconnect(!this.connected);
await defer(5000);
await defer(10000);
} catch (e) {
this.logger.error("Disconnect failed");
}
Expand Down Expand Up @@ -392,8 +392,7 @@ export class Runner<X extends AppConfig> implements IComponent {
}

private async exit(exitCode?: number) {
//TODO: we need to wait a bit for the logs to flush - we shouldn't need to as cleanup should wait.
//await defer(200);
await defer(200);

this.cleanup()
.then((code) => { process.exitCode = exitCode || code; }, (e) => console.error(e?.stack))
Expand All @@ -405,18 +404,16 @@ export class Runner<X extends AppConfig> implements IComponent {

try {
this.logger.debug("connecting...");
await promiseTimeout(this.hostClient.init(this.instanceId), 5000);
await promiseTimeout(this.hostClient.init(this.instanceId), 10000);
this.logger.debug("connected");
this.connected = true;

this.hostClient.inputStream.pipe(this.logFile!);

await this.handleMonitoringRequest({ monitoringRate: 1 });
} catch (e) {
this.connected = false;
this.logger.warn("Can't connect to Host", e);

await defer(5000);
await defer(10000);

return await this.premain();
}
Expand Down Expand Up @@ -464,7 +461,6 @@ export class Runner<X extends AppConfig> implements IComponent {

try {
sequence = this.getSequence();
// this.logger.debug("Sequence", sequence);

if (sequence.length && typeof sequence[0] !== "function") {
this.logger.debug("First Sequence object is not a function:", sequence[0]);
Expand Down

0 comments on commit a05c64f

Please sign in to comment.