@nimee/initialize-ms 1.0.74 → 1.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/index.js
CHANGED
|
@@ -69,7 +69,12 @@ class AppInitializer {
|
|
|
69
69
|
// await redisService.initRedisConnection(this.serviceName, `${this.serviceName}_`);
|
|
70
70
|
}
|
|
71
71
|
error_handler_1.errorHandler.registerAndHandleAllErrors(this.server);
|
|
72
|
-
|
|
72
|
+
// Initialize health service with MongoDB health checker
|
|
73
|
+
const healthService = new health_1.default(this.server, undefined);
|
|
74
|
+
if (dbConnection && !blackFeatureList.includes("mongo")) {
|
|
75
|
+
healthService.setMongoHealthChecker(() => dbConnection.isHealthy());
|
|
76
|
+
}
|
|
77
|
+
yield healthService.start(this.serviceName);
|
|
73
78
|
metrics_1.defaultMetricsExporter.collectDefaultMetricsAndExport(this.server, "/metrics", 2000, process.env.logLevel);
|
|
74
79
|
if (entryPointsInitializer) {
|
|
75
80
|
const allEntryPointInitializers = [entryPointsInitializer];
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wEAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wEAAgD;AA0FvC,0BA1FF,yBAAe,CA0FE;AAzFxB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;IACvE,MAAM,MAAM,GAAG,IAAI,yBAAe,EAAE,CAAC;IACrC,MAAM,CAAC,IAAI,CAAC;QACV,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;QACrC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;KA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CAAC,MAAM,CAAC,CAAC;YAErD,wDAAwD;YACxD,MAAM,aAAa,GAAG,IAAI,gBAAa,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAChE,IAAI,YAAY,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACxD,aAAa,CAAC,qBAAqB,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC;YACtE,CAAC;YACD,MAAM,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAE5C,gCAAsB,CAAC,8BAA8B,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAE3G,IAAI,sBAAsB,EAAE,CAAC;gBAC3B,MAAM,yBAAyB,GAAG,CAAC,sBAAsB,CAAC,CAAC;gBAC3D,yBAAyB,CAAC,OAAO,CAAC,CAAC,qBAAqB,EAAE,EAAE;oBAC1D,gBAAM,CAAC,IAAI,CAAC,mDAAmD,IAAI,CAAC,WAAW,KAAK,CAAC,CAAC;oBACtF,IAAI,qBAAqB,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACtD,CAAC,CAAC,CAAC;gBACH,gBAAM,CAAC,IAAI,CAAC,sCAAsC,IAAI,CAAC,WAAW,KAAK,CAAC,CAAC;YAC3E,CAAC;YACD,IAAI,UAAU;gBAAE,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC;KAAA;CACF;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -17,6 +17,9 @@ const mongoose_1 = __importDefault(require("mongoose"));
|
|
|
17
17
|
const logger_1 = __importDefault(require("@nimee/logger"));
|
|
18
18
|
let connectionIntance;
|
|
19
19
|
class MongooseConnection {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.disconnectionTime = null;
|
|
22
|
+
}
|
|
20
23
|
static getDefaultInstance() {
|
|
21
24
|
if (!connectionIntance) {
|
|
22
25
|
connectionIntance = new MongooseConnection();
|
|
@@ -26,6 +29,8 @@ class MongooseConnection {
|
|
|
26
29
|
connectToDB(connectionString, serviceName) {
|
|
27
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
31
|
try {
|
|
32
|
+
this.serviceName = serviceName;
|
|
33
|
+
this.connectionString = connectionString;
|
|
29
34
|
if (this.db) {
|
|
30
35
|
logger_1.default.info("Mongo already Connected");
|
|
31
36
|
return this.db;
|
|
@@ -35,12 +40,59 @@ class MongooseConnection {
|
|
|
35
40
|
});
|
|
36
41
|
logger_1.default.info(`Connected successfully to mongo server from ${serviceName}`);
|
|
37
42
|
this.db = mongoose_1.default.connection;
|
|
43
|
+
this.setupConnectionEventListeners();
|
|
38
44
|
}
|
|
39
45
|
catch (error) {
|
|
40
46
|
throw new error_handler_1.CustomError(`${serviceName}_mongoose_connection_failed`, 400, `connectToDb from ${serviceName} with error ${error.message}`, error);
|
|
41
47
|
}
|
|
42
48
|
});
|
|
43
49
|
}
|
|
50
|
+
setupConnectionEventListeners() {
|
|
51
|
+
if (!this.db)
|
|
52
|
+
return;
|
|
53
|
+
this.db.on("connected", () => {
|
|
54
|
+
logger_1.default.info(`MongoDB connected for ${this.serviceName}`);
|
|
55
|
+
this.disconnectionTime = null;
|
|
56
|
+
});
|
|
57
|
+
this.db.on("disconnected", () => {
|
|
58
|
+
logger_1.default.warn(`MongoDB disconnected for ${this.serviceName}`);
|
|
59
|
+
this.disconnectionTime = new Date();
|
|
60
|
+
});
|
|
61
|
+
this.db.on("error", (error) => {
|
|
62
|
+
logger_1.default.error(`MongoDB connection error for ${this.serviceName}:`, error);
|
|
63
|
+
this.disconnectionTime = new Date();
|
|
64
|
+
});
|
|
65
|
+
this.db.on("reconnected", () => {
|
|
66
|
+
logger_1.default.info(`MongoDB reconnected for ${this.serviceName}`);
|
|
67
|
+
this.disconnectionTime = null;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
isHealthy() {
|
|
71
|
+
if (!this.db)
|
|
72
|
+
return false;
|
|
73
|
+
// Check if connected
|
|
74
|
+
if (this.db.readyState === 1)
|
|
75
|
+
return true;
|
|
76
|
+
// If disconnected, check if it's been less than the grace period
|
|
77
|
+
if (this.db.readyState === 0 && this.disconnectionTime) {
|
|
78
|
+
const timeSinceDisconnection = Date.now() - this.disconnectionTime.getTime();
|
|
79
|
+
const gracePeriodMinutes = parseInt(process.env.MONGO_GRACE_PERIOD_MINUTES || "5", 10);
|
|
80
|
+
const gracePeriodMs = gracePeriodMinutes * 60 * 1000;
|
|
81
|
+
return timeSinceDisconnection < gracePeriodMs;
|
|
82
|
+
}
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
getConnectionStatus() {
|
|
86
|
+
if (!this.db) {
|
|
87
|
+
return { connected: false };
|
|
88
|
+
}
|
|
89
|
+
const connected = this.db.readyState === 1;
|
|
90
|
+
if (!connected && this.disconnectionTime) {
|
|
91
|
+
const timeSinceDisconnection = Date.now() - this.disconnectionTime.getTime();
|
|
92
|
+
return { connected, timeSinceDisconnection };
|
|
93
|
+
}
|
|
94
|
+
return { connected };
|
|
95
|
+
}
|
|
44
96
|
}
|
|
45
97
|
exports.default = MongooseConnection.getDefaultInstance();
|
|
46
98
|
//# sourceMappingURL=mongooseConnection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongooseConnection.js","sourceRoot":"","sources":["../../src/mongooseConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wDAAiE;AACjE,wDAAgD;AAChD,2DAAmC;AACnC,IAAI,iBAAsB,CAAC;AAE3B,MAAM,kBAAkB;
|
|
1
|
+
{"version":3,"file":"mongooseConnection.js","sourceRoot":"","sources":["../../src/mongooseConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wDAAiE;AACjE,wDAAgD;AAChD,2DAAmC;AACnC,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,iBAAiB,CAAC,OAAO,EAAE,CAAC;YAC7E,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,GAAG,EAAE,EAAE,CAAC,CAAC;YACvF,MAAM,aAAa,GAAG,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;YACrD,OAAO,sBAAsB,GAAG,aAAa,CAAC;QAChD,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED,mBAAmB;QACjB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QAC9B,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,KAAK,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACzC,MAAM,sBAAsB,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;YAC7E,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;QAC/C,CAAC;QAED,OAAO,EAAE,SAAS,EAAE,CAAC;IACvB,CAAC;CACF;AACD,kBAAe,kBAAkB,CAAC,kBAAkB,EAAE,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -65,7 +65,14 @@ class AppInitializer {
|
|
|
65
65
|
// await redisService.initRedisConnection(this.serviceName, `${this.serviceName}_`);
|
|
66
66
|
}
|
|
67
67
|
errorHandler.registerAndHandleAllErrors(this.server);
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
// Initialize health service with MongoDB health checker
|
|
70
|
+
const healthService = new HealthService(this.server, undefined);
|
|
71
|
+
if (dbConnection && !blackFeatureList.includes("mongo")) {
|
|
72
|
+
healthService.setMongoHealthChecker(() => dbConnection.isHealthy());
|
|
73
|
+
}
|
|
74
|
+
await healthService.start(this.serviceName);
|
|
75
|
+
|
|
69
76
|
defaultMetricsExporter.collectDefaultMetricsAndExport(this.server, "/metrics", 2000, process.env.logLevel);
|
|
70
77
|
|
|
71
78
|
if (entryPointsInitializer) {
|
|
@@ -5,6 +5,10 @@ let connectionIntance: any;
|
|
|
5
5
|
|
|
6
6
|
class MongooseConnection {
|
|
7
7
|
db: Connection;
|
|
8
|
+
private serviceName: string;
|
|
9
|
+
private disconnectionTime: Date | null = null;
|
|
10
|
+
private connectionString: string;
|
|
11
|
+
|
|
8
12
|
static getDefaultInstance() {
|
|
9
13
|
if (!connectionIntance) {
|
|
10
14
|
connectionIntance = new MongooseConnection();
|
|
@@ -12,8 +16,12 @@ class MongooseConnection {
|
|
|
12
16
|
|
|
13
17
|
return connectionIntance;
|
|
14
18
|
}
|
|
19
|
+
|
|
15
20
|
async connectToDB(connectionString: string, serviceName: string) {
|
|
16
21
|
try {
|
|
22
|
+
this.serviceName = serviceName;
|
|
23
|
+
this.connectionString = connectionString;
|
|
24
|
+
|
|
17
25
|
if (this.db) {
|
|
18
26
|
logger.info("Mongo already Connected");
|
|
19
27
|
return this.db;
|
|
@@ -25,6 +33,7 @@ class MongooseConnection {
|
|
|
25
33
|
logger.info(`Connected successfully to mongo server from ${serviceName}`);
|
|
26
34
|
|
|
27
35
|
this.db = mongoose.connection;
|
|
36
|
+
this.setupConnectionEventListeners();
|
|
28
37
|
} catch (error) {
|
|
29
38
|
throw new CustomError(
|
|
30
39
|
`${serviceName}_mongoose_connection_failed`,
|
|
@@ -34,5 +43,61 @@ class MongooseConnection {
|
|
|
34
43
|
);
|
|
35
44
|
}
|
|
36
45
|
}
|
|
46
|
+
|
|
47
|
+
private setupConnectionEventListeners() {
|
|
48
|
+
if (!this.db) return;
|
|
49
|
+
|
|
50
|
+
this.db.on("connected", () => {
|
|
51
|
+
logger.info(`MongoDB connected for ${this.serviceName}`);
|
|
52
|
+
this.disconnectionTime = null;
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
this.db.on("disconnected", () => {
|
|
56
|
+
logger.warn(`MongoDB disconnected for ${this.serviceName}`);
|
|
57
|
+
this.disconnectionTime = new Date();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
this.db.on("error", (error) => {
|
|
61
|
+
logger.error(`MongoDB connection error for ${this.serviceName}:`, error);
|
|
62
|
+
this.disconnectionTime = new Date();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
this.db.on("reconnected", () => {
|
|
66
|
+
logger.info(`MongoDB reconnected for ${this.serviceName}`);
|
|
67
|
+
this.disconnectionTime = null;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
isHealthy(): boolean {
|
|
72
|
+
if (!this.db) return false;
|
|
73
|
+
|
|
74
|
+
// Check if connected
|
|
75
|
+
if (this.db.readyState === 1) return true;
|
|
76
|
+
|
|
77
|
+
// If disconnected, check if it's been less than the grace period
|
|
78
|
+
if (this.db.readyState === 0 && this.disconnectionTime) {
|
|
79
|
+
const timeSinceDisconnection = Date.now() - this.disconnectionTime.getTime();
|
|
80
|
+
const gracePeriodMinutes = parseInt(process.env.MONGO_GRACE_PERIOD_MINUTES || "5", 10);
|
|
81
|
+
const gracePeriodMs = gracePeriodMinutes * 60 * 1000;
|
|
82
|
+
return timeSinceDisconnection < gracePeriodMs;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
getConnectionStatus(): { connected: boolean; timeSinceDisconnection?: number } {
|
|
89
|
+
if (!this.db) {
|
|
90
|
+
return { connected: false };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const connected = this.db.readyState === 1;
|
|
94
|
+
|
|
95
|
+
if (!connected && this.disconnectionTime) {
|
|
96
|
+
const timeSinceDisconnection = Date.now() - this.disconnectionTime.getTime();
|
|
97
|
+
return { connected, timeSinceDisconnection };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return { connected };
|
|
101
|
+
}
|
|
37
102
|
}
|
|
38
103
|
export default MongooseConnection.getDefaultInstance();
|