@riocrypto/common-server 1.0.2919 → 1.0.2922
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/build/index.js +0 -1
- package/build/models/alfin-withdrawal.js +15 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -208,7 +208,6 @@ __exportStar(require("./helpers/find-user-tier-forward-curve-rate"), exports);
|
|
|
208
208
|
__exportStar(require("./helpers/resolve-forward-curve-rate"), exports);
|
|
209
209
|
__exportStar(require("./helpers/get-resolved-forward-curve-tiers"), exports);
|
|
210
210
|
__exportStar(require("./helpers/get-fx-trading-policy"), exports);
|
|
211
|
-
;
|
|
212
211
|
__exportStar(require("./clients/google-sheets-api-client"), exports);
|
|
213
212
|
__exportStar(require("./clients/binance-client"), exports);
|
|
214
213
|
__exportStar(require("./clients/kraken-client"), exports);
|
|
@@ -77,6 +77,21 @@ const buildAlfinWithdrawal = (mongoose) => {
|
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
|
+
// Nothing here was indexed, so the background workers below were reading the
|
|
81
|
+
// whole collection every few seconds. Both indexes are multikey over the
|
|
82
|
+
// parts array, which is allowed because the fields belong to the same array
|
|
83
|
+
// rather than to parallel ones.
|
|
84
|
+
// Settlement reconciliation and treasury part submission both hunt for parts
|
|
85
|
+
// sitting in `processing`, on a timer, forever. Parts in that state are a
|
|
86
|
+
// small minority of a collection that only grows, which is what makes the
|
|
87
|
+
// scan worth removing.
|
|
88
|
+
AlfinWithdrawalSchema.index({
|
|
89
|
+
"AlfinWithdrawals.status": 1,
|
|
90
|
+
"AlfinWithdrawals.statusCheckAfter": 1,
|
|
91
|
+
});
|
|
92
|
+
// The treasury import reads the recent internal transfers on every run, to
|
|
93
|
+
// recognise the statement lines of transfers Rio sent itself.
|
|
94
|
+
AlfinWithdrawalSchema.index({ type: 1, createdAt: -1 });
|
|
80
95
|
AlfinWithdrawalSchema.statics.build = (attrs) => {
|
|
81
96
|
return new AlfinWithdrawal(attrs);
|
|
82
97
|
};
|