Skip to content

Commit

Permalink
Reconnect. logs. [wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
patuwwy committed Sep 25, 2023
1 parent 7526211 commit 96985e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion packages/host/src/lib/csi-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ export class CSIController extends TypedEmitter<Events> {

this.logger = new ObjLogger(this, { id: this.id });

this.logger.debug("Constructor executed");
this.logger.debug("Constructor executed", arguments);

// eslint-disable-next-line no-console
console.log("Constructor executed", arguments);

this.status = InstanceStatus.INITIALIZING;

Expand Down
10 changes: 5 additions & 5 deletions packages/runner/src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,17 @@ export class Runner<X extends AppConfig> implements IComponent {
.finally(() => process.exit());
}

async premain() {
async premain(): Promise<{ appConfig: AppConfig, args: any}> {
this.logger.debug("premain");

try {
await this.hostClient.init(this.instanceId);
} catch (e) {
this.logger.error("hostClient init error", e);

await defer(2000);

this.premain().catch((err: any) => {
this.logger.error("Premain error", err);
});
return await this.premain();
}

this.redirectOutputs();
Expand All @@ -358,7 +358,7 @@ export class Runner<X extends AppConfig> implements IComponent {

const { appConfig, args } = await this.waitForHandshakeResponse();

this.logger.debug("Handshake received");
this.logger.debug("Handshake received", appConfig, args);

return { appConfig, args };
}
Expand Down

0 comments on commit 96985e6

Please sign in to comment.