Skip to content

Commit a120977

Browse files
committed
fix circular reference
1 parent 30cce6c commit a120977

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

OpenFlow/src/Config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import * as fs from "fs";
33
import * as path from "path";
44
import * as retry from "async-retry";
55
import { DatabaseConnection } from "./DatabaseConnection";
6-
import { Logger } from "./Logger";
6+
// import { Logger } from "./Logger";
77
import { NoderedUtil } from "@openiap/openflow-api";
8-
98
export class Config {
109
public static getversion(): string {
1110
let versionfile: string = path.join(__dirname, "VERSION");
@@ -439,7 +438,8 @@ export class Config {
439438
}, {
440439
retries: 50,
441440
onRetry: function (error: Error, count: number): void {
442-
Logger.instanse.warn("retry " + count + " error " + error.message + " getting " + url);
441+
console.log("retry " + count + " error " + error.message + " getting " + url);
442+
// Logger.instanse.warn("retry " + count + " error " + error.message + " getting " + url);
443443
}
444444
});
445445
}

OpenFlow/src/Logger.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ export class Logger {
4242
return "n/a";
4343
}
4444
};
45+
public static async shutdown() {
46+
Logger.License.shutdown();
47+
await Config.db.shutdown();
48+
await Logger.otel.shutdown();
49+
}
4550
static configure(skipotel: boolean, skiplic: boolean): winston.Logger {
4651
const filename = path.join(Config.logpath, "openflow.log");
4752
const options: any = {

0 commit comments

Comments
 (0)