@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.cjs
CHANGED
|
@@ -887,11 +887,9 @@ var QueryEngine = class {
|
|
|
887
887
|
async executeWithTcpServer(args) {
|
|
888
888
|
const serverInfo = globalTcpServers.get(this.connectionId);
|
|
889
889
|
if (!serverInfo || !serverInfo.process || serverInfo.process.killed) {
|
|
890
|
-
console.log("\u{1F680} Starting TCP server for ultra-fast queries...");
|
|
891
890
|
await this.startTcpServer();
|
|
892
891
|
await this.waitForServerReady();
|
|
893
892
|
}
|
|
894
|
-
console.log("\u26A1 Using TCP server (ultra-fast)");
|
|
895
893
|
return this.sendTcpRequestFast(args);
|
|
896
894
|
}
|
|
897
895
|
async waitForServerReady() {
|
|
@@ -901,7 +899,6 @@ var QueryEngine = class {
|
|
|
901
899
|
if (await this.isServerResponding()) {
|
|
902
900
|
return;
|
|
903
901
|
}
|
|
904
|
-
console.log(`\u23F3 Waiting for TCP server to be ready... (${i + 1}/${maxRetries})`);
|
|
905
902
|
await this.sleep(retryDelay);
|
|
906
903
|
}
|
|
907
904
|
throw new Error("TCP server failed to become ready within timeout");
|
|
@@ -944,7 +941,6 @@ var QueryEngine = class {
|
|
|
944
941
|
throw new Error("Binary not initialized");
|
|
945
942
|
}
|
|
946
943
|
this.tcpPort = await this.findAvailablePort(this.tcpPort);
|
|
947
|
-
console.log(`\u{1F310} Using port ${this.tcpPort} for TCP server`);
|
|
948
944
|
return new Promise((resolve5, reject) => {
|
|
949
945
|
const serverArgs = [...this.arguments, "--action", "server", "--port", this.tcpPort.toString()];
|
|
950
946
|
const serverProcess = (0, import_child_process2.spawn)(this.binary["query_engine"], serverArgs);
|
|
@@ -957,7 +953,6 @@ var QueryEngine = class {
|
|
|
957
953
|
}, 15e3);
|
|
958
954
|
serverProcess.stdout.on("data", (data) => {
|
|
959
955
|
const output = data.toString();
|
|
960
|
-
console.log(`[TCP Server] ${output.trim()}`);
|
|
961
956
|
if (output.includes("TCP Server listening on")) {
|
|
962
957
|
if (!started) {
|
|
963
958
|
started = true;
|
|
@@ -974,7 +969,6 @@ var QueryEngine = class {
|
|
|
974
969
|
console.error(`[TCP Server Error] ${data.toString().trim()}`);
|
|
975
970
|
});
|
|
976
971
|
serverProcess.on("close", (code) => {
|
|
977
|
-
console.log(`[TCP Server] Process exited with code ${code}`);
|
|
978
972
|
globalTcpServers.delete(this.connectionId);
|
|
979
973
|
});
|
|
980
974
|
serverProcess.on("error", (error) => {
|
|
@@ -1278,7 +1272,6 @@ var QueryEngine = class {
|
|
|
1278
1272
|
}
|
|
1279
1273
|
const serverInfo = globalTcpServers.get(this.connectionId);
|
|
1280
1274
|
if (serverInfo && serverInfo.process && !serverInfo.process.killed) {
|
|
1281
|
-
console.log("\u{1F50C} Stopping TCP server...");
|
|
1282
1275
|
serverInfo.process.kill();
|
|
1283
1276
|
globalTcpServers.delete(this.connectionId);
|
|
1284
1277
|
return {
|