hedgequantx 2.9.242 → 2.9.243
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
|
@@ -309,14 +309,13 @@ async function startDaemonBackground() {
|
|
|
309
309
|
// Install daemon to isolated directory first
|
|
310
310
|
const installed = installDaemon();
|
|
311
311
|
if (!installed) {
|
|
312
|
-
log.
|
|
313
|
-
return
|
|
312
|
+
log.warn('Failed to install daemon to isolated dir, using direct mode');
|
|
313
|
+
return startDaemonDirect();
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
// Check if isolated daemon entry exists
|
|
317
317
|
if (!fs.existsSync(DAEMON_ENTRY)) {
|
|
318
|
-
log.
|
|
319
|
-
// Fallback to direct execution
|
|
318
|
+
log.warn('Daemon entry not found, using direct mode', { path: DAEMON_ENTRY });
|
|
320
319
|
return startDaemonDirect();
|
|
321
320
|
}
|
|
322
321
|
|
|
@@ -338,7 +337,7 @@ async function startDaemonBackground() {
|
|
|
338
337
|
let attempts = 0;
|
|
339
338
|
const maxAttempts = 30;
|
|
340
339
|
|
|
341
|
-
const check = setInterval(() => {
|
|
340
|
+
const check = setInterval(async () => {
|
|
342
341
|
attempts++;
|
|
343
342
|
|
|
344
343
|
if (isDaemonRunning()) {
|
|
@@ -347,8 +346,10 @@ async function startDaemonBackground() {
|
|
|
347
346
|
resolve(true);
|
|
348
347
|
} else if (attempts >= maxAttempts) {
|
|
349
348
|
clearInterval(check);
|
|
350
|
-
log.
|
|
351
|
-
|
|
349
|
+
log.warn('Isolated daemon failed to start, trying direct mode');
|
|
350
|
+
// Fallback to direct mode
|
|
351
|
+
const directResult = await startDaemonDirect();
|
|
352
|
+
resolve(directResult);
|
|
352
353
|
}
|
|
353
354
|
}, 100);
|
|
354
355
|
});
|