@vtex/api 7.2.1-beta.0 → 7.2.1-beta.1
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.
|
@@ -194,8 +194,8 @@ const startWorker = (serviceJSON) => {
|
|
|
194
194
|
const privateHandlersRouter = routerFromPrivateHttpHandlers(httpHandlers.pvt);
|
|
195
195
|
app.use(privateHandlersRouter.routes());
|
|
196
196
|
}
|
|
197
|
-
global.metrics = new MetricsAccumulator_1.MetricsAccumulator();
|
|
198
197
|
process.on('message', onMessage(serviceJSON));
|
|
199
198
|
return app;
|
|
200
199
|
};
|
|
201
200
|
exports.startWorker = startWorker;
|
|
201
|
+
global.metrics = new MetricsAccumulator_1.MetricsAccumulator();
|
|
@@ -23,9 +23,11 @@ const statusTrackHandler = async (ctx) => {
|
|
|
23
23
|
};
|
|
24
24
|
exports.statusTrackHandler = statusTrackHandler;
|
|
25
25
|
const trackStatus = () => {
|
|
26
|
-
global.metrics
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
if (global.metrics) {
|
|
27
|
+
global.metrics.statusTrack().forEach(status => {
|
|
28
|
+
logStatus(status);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
29
31
|
};
|
|
30
32
|
exports.trackStatus = trackStatus;
|
|
31
33
|
const broadcastStatusTrack = () => Object.values(cluster_1.default.workers).forEach(worker => worker === null || worker === void 0 ? void 0 : worker.send(STATUS_TRACK));
|