@pioneer-platform/markets 8.15.2 → 8.15.9
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/CHANGELOG.md +6 -0
- package/lib/index.js +7 -3
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -2060,7 +2060,7 @@ var get_batch_prices_by_caip = function (caips_1) {
|
|
|
2060
2060
|
*/
|
|
2061
2061
|
function initializeTokenBuckets() {
|
|
2062
2062
|
return __awaiter(this, void 0, void 0, function () {
|
|
2063
|
-
var tag,
|
|
2063
|
+
var tag, mongoModule, db, error_12;
|
|
2064
2064
|
return __generator(this, function (_a) {
|
|
2065
2065
|
switch (_a.label) {
|
|
2066
2066
|
case 0:
|
|
@@ -2075,8 +2075,12 @@ function initializeTokenBuckets() {
|
|
|
2075
2075
|
case 1:
|
|
2076
2076
|
_a.trys.push([1, 3, 4, 5]);
|
|
2077
2077
|
log.info(tag, 'Initializing token bucket system...');
|
|
2078
|
-
|
|
2079
|
-
|
|
2078
|
+
mongoModule = require('@pioneer-platform/default-mongo-v2');
|
|
2079
|
+
if (!mongoModule || !mongoModule.mongo) {
|
|
2080
|
+
log.warn(tag, 'MongoDB not initialized yet - skipping token bucket initialization');
|
|
2081
|
+
return [2 /*return*/];
|
|
2082
|
+
}
|
|
2083
|
+
db = mongoModule.mongo.db('pioneer');
|
|
2080
2084
|
// Initialize metrics logger first
|
|
2081
2085
|
metricsLogger = new metrics_logger_1.MetricsLogger(db);
|
|
2082
2086
|
log.info(tag, '✅ MetricsLogger initialized');
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/markets",
|
|
3
|
-
"version": "8.15.
|
|
3
|
+
"version": "8.15.9",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
+
"@pioneer-platform/default-mongo-v2": "workspace:*",
|
|
7
8
|
"@pioneer-platform/default-redis": "^8.11.7",
|
|
8
9
|
"@pioneer-platform/loggerdog": "^8.11.0",
|
|
9
10
|
"@pioneer-platform/pioneer-coins": "^9.11.0",
|