hedgequantx 2.9.170 → 2.9.171
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/package.json
CHANGED
|
@@ -188,20 +188,35 @@ const fetchAllFrontMonths = (service) => {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
let sentCount = 0;
|
|
191
|
-
|
|
191
|
+
let sendErrors = [];
|
|
192
|
+
// Only send for first 5 products to test
|
|
193
|
+
const productsArray = Array.from(productsToCheck.values());
|
|
194
|
+
const testProducts = productsArray.slice(0, 60); // Limit to 60 for testing
|
|
195
|
+
|
|
196
|
+
for (const product of testProducts) {
|
|
192
197
|
try {
|
|
193
|
-
|
|
198
|
+
const reqData = {
|
|
194
199
|
templateId: 113,
|
|
195
200
|
userMsg: [product.productCode],
|
|
196
201
|
symbol: product.productCode,
|
|
197
202
|
exchange: product.exchange,
|
|
198
|
-
}
|
|
203
|
+
};
|
|
204
|
+
// Log first request
|
|
205
|
+
if (sentCount === 0) {
|
|
206
|
+
brokerLog('First RequestFrontMonthContract', reqData);
|
|
207
|
+
}
|
|
208
|
+
service.tickerConn.send('RequestFrontMonthContract', reqData);
|
|
199
209
|
sentCount++;
|
|
200
210
|
} catch (err) {
|
|
201
|
-
|
|
211
|
+
sendErrors.push({ product: product.productCode, error: err.message });
|
|
202
212
|
}
|
|
203
213
|
}
|
|
204
|
-
brokerLog('RequestFrontMonthContract sent', {
|
|
214
|
+
brokerLog('RequestFrontMonthContract sent', {
|
|
215
|
+
sentCount,
|
|
216
|
+
totalProducts: productsToCheck.size,
|
|
217
|
+
limitedTo: testProducts.length,
|
|
218
|
+
errors: sendErrors.length > 0 ? sendErrors.slice(0, 3) : 'none'
|
|
219
|
+
});
|
|
205
220
|
|
|
206
221
|
// Collect results after timeout
|
|
207
222
|
setTimeout(() => {
|