@vtex/api 7.4.1 → 7.4.2
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.
|
@@ -26,22 +26,11 @@ exports.statusTrackHandler = statusTrackHandler;
|
|
|
26
26
|
const trackStatus = () => {
|
|
27
27
|
// Update diagnostics metrics (gauges for HTTP agent stats)
|
|
28
28
|
HttpAgentSingleton_1.HttpAgentSingleton.updateHttpAgentMetrics();
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// Flushing resets the metric accumulators, the CPU usage baseline and the
|
|
30
|
+
// incoming request stats, so it must keep running even though nothing
|
|
31
|
+
// consumes the returned metrics anymore.
|
|
32
|
+
global.metrics.statusTrack();
|
|
33
33
|
};
|
|
34
34
|
exports.trackStatus = trackStatus;
|
|
35
35
|
const broadcastStatusTrack = () => Object.values(cluster_1.default.workers).forEach(worker => worker === null || worker === void 0 ? void 0 : worker.send(STATUS_TRACK));
|
|
36
36
|
exports.broadcastStatusTrack = broadcastStatusTrack;
|
|
37
|
-
const logStatus = (status) => console.log(JSON.stringify({
|
|
38
|
-
__VTEX_IO_LOG: true,
|
|
39
|
-
account: constants_1.ACCOUNT,
|
|
40
|
-
app: constants_1.APP.ID,
|
|
41
|
-
isLink: constants_1.LINKED,
|
|
42
|
-
pid: process.pid,
|
|
43
|
-
production: constants_1.PRODUCTION,
|
|
44
|
-
status,
|
|
45
|
-
type: 'metric/status',
|
|
46
|
-
workspace: constants_1.WORKSPACE,
|
|
47
|
-
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtex/api",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.2",
|
|
4
4
|
"description": "VTEX I/O API client",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -132,5 +132,6 @@
|
|
|
132
132
|
},
|
|
133
133
|
"resolutions": {
|
|
134
134
|
"@grpc/grpc-js": "^1.13.4"
|
|
135
|
-
}
|
|
135
|
+
},
|
|
136
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
136
137
|
}
|