@softerist/heuristic-mcp 2.1.45 → 2.1.46
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/index.js +20 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -248,9 +248,17 @@ process.on('SIGINT', async () => {
|
|
|
248
248
|
console.error("[Server] File watcher stopped");
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
//
|
|
251
|
+
// Give workers time to finish current batch (prevents core dump)
|
|
252
252
|
if (indexer && indexer.terminateWorkers) {
|
|
253
|
-
|
|
253
|
+
try {
|
|
254
|
+
console.error("[Server] Waiting for workers to finish...");
|
|
255
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
256
|
+
await indexer.terminateWorkers();
|
|
257
|
+
console.error("[Server] Workers terminated");
|
|
258
|
+
} catch (err) {
|
|
259
|
+
// Suppress native module errors during shutdown
|
|
260
|
+
console.error("[Server] Workers shutdown (with warnings)");
|
|
261
|
+
}
|
|
254
262
|
}
|
|
255
263
|
|
|
256
264
|
// Save cache
|
|
@@ -272,9 +280,17 @@ process.on('SIGTERM', async () => {
|
|
|
272
280
|
console.error("[Server] File watcher stopped");
|
|
273
281
|
}
|
|
274
282
|
|
|
275
|
-
//
|
|
283
|
+
// Give workers time to finish current batch (prevents core dump)
|
|
276
284
|
if (indexer && indexer.terminateWorkers) {
|
|
277
|
-
|
|
285
|
+
try {
|
|
286
|
+
console.error("[Server] Waiting for workers to finish...");
|
|
287
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
288
|
+
await indexer.terminateWorkers();
|
|
289
|
+
console.error("[Server] Workers terminated");
|
|
290
|
+
} catch (err) {
|
|
291
|
+
// Suppress native module errors during shutdown
|
|
292
|
+
console.error("[Server] Workers shutdown (with warnings)");
|
|
293
|
+
}
|
|
278
294
|
}
|
|
279
295
|
|
|
280
296
|
// Save cache
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softerist/heuristic-mcp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.46",
|
|
4
4
|
"description": "An enhanced MCP server providing intelligent semantic code search with find-similar-code, recency ranking, and improved chunking. Fork of smart-coding-mcp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|