@dbcube/core 3.0.9 → 3.0.10
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/dist/index.cjs +0 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -849,11 +849,9 @@ var QueryEngine = class {
|
|
|
849
849
|
async executeWithTcpServer(args) {
|
|
850
850
|
const serverInfo = globalTcpServers.get(this.connectionId);
|
|
851
851
|
if (!serverInfo || !serverInfo.process || serverInfo.process.killed) {
|
|
852
|
-
console.log("\u{1F680} Starting TCP server for ultra-fast queries...");
|
|
853
852
|
await this.startTcpServer();
|
|
854
853
|
await this.waitForServerReady();
|
|
855
854
|
}
|
|
856
|
-
console.log("\u26A1 Using TCP server (ultra-fast)");
|
|
857
855
|
return this.sendTcpRequestFast(args);
|
|
858
856
|
}
|
|
859
857
|
async waitForServerReady() {
|
|
@@ -863,7 +861,6 @@ var QueryEngine = class {
|
|
|
863
861
|
if (await this.isServerResponding()) {
|
|
864
862
|
return;
|
|
865
863
|
}
|
|
866
|
-
console.log(`\u23F3 Waiting for TCP server to be ready... (${i + 1}/${maxRetries})`);
|
|
867
864
|
await this.sleep(retryDelay);
|
|
868
865
|
}
|
|
869
866
|
throw new Error("TCP server failed to become ready within timeout");
|
|
@@ -906,7 +903,6 @@ var QueryEngine = class {
|
|
|
906
903
|
throw new Error("Binary not initialized");
|
|
907
904
|
}
|
|
908
905
|
this.tcpPort = await this.findAvailablePort(this.tcpPort);
|
|
909
|
-
console.log(`\u{1F310} Using port ${this.tcpPort} for TCP server`);
|
|
910
906
|
return new Promise((resolve5, reject) => {
|
|
911
907
|
const serverArgs = [...this.arguments, "--action", "server", "--port", this.tcpPort.toString()];
|
|
912
908
|
const serverProcess = spawn2(this.binary["query_engine"], serverArgs);
|
|
@@ -919,7 +915,6 @@ var QueryEngine = class {
|
|
|
919
915
|
}, 15e3);
|
|
920
916
|
serverProcess.stdout.on("data", (data) => {
|
|
921
917
|
const output = data.toString();
|
|
922
|
-
console.log(`[TCP Server] ${output.trim()}`);
|
|
923
918
|
if (output.includes("TCP Server listening on")) {
|
|
924
919
|
if (!started) {
|
|
925
920
|
started = true;
|
|
@@ -936,7 +931,6 @@ var QueryEngine = class {
|
|
|
936
931
|
console.error(`[TCP Server Error] ${data.toString().trim()}`);
|
|
937
932
|
});
|
|
938
933
|
serverProcess.on("close", (code) => {
|
|
939
|
-
console.log(`[TCP Server] Process exited with code ${code}`);
|
|
940
934
|
globalTcpServers.delete(this.connectionId);
|
|
941
935
|
});
|
|
942
936
|
serverProcess.on("error", (error) => {
|
|
@@ -1240,7 +1234,6 @@ var QueryEngine = class {
|
|
|
1240
1234
|
}
|
|
1241
1235
|
const serverInfo = globalTcpServers.get(this.connectionId);
|
|
1242
1236
|
if (serverInfo && serverInfo.process && !serverInfo.process.killed) {
|
|
1243
|
-
console.log("\u{1F50C} Stopping TCP server...");
|
|
1244
1237
|
serverInfo.process.kill();
|
|
1245
1238
|
globalTcpServers.delete(this.connectionId);
|
|
1246
1239
|
return {
|