mirror of
https://github.com/aaronsb/obsidian-mcp-plugin.git
synced 2026-07-22 06:45:14 +00:00
- Implement worker threads per session for CPU-intensive operations - Offload graph traversal and search operations to workers - Fix concurrent session blocking with proper parallelization - Add WorkerManager for session-based worker lifecycle - Update build process to compile worker scripts This release (0.5.8b) enables true concurrent processing by running operations in separate worker threads, preventing blocking between multiple MCP clients.
26 lines
No EOL
810 B
JavaScript
Executable file
26 lines
No EOL
810 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
const { execSync } = require('child_process');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
console.log('Building worker scripts...');
|
|
|
|
const workerSrcDir = path.join(__dirname, 'src', 'workers');
|
|
const workerDistDir = path.join(__dirname, 'dist', 'workers');
|
|
|
|
// Create dist/workers directory if it doesn't exist
|
|
if (!fs.existsSync(workerDistDir)) {
|
|
fs.mkdirSync(workerDistDir, { recursive: true });
|
|
}
|
|
|
|
// Compile TypeScript worker files
|
|
try {
|
|
execSync(`npx tsc src/workers/*.ts --outDir dist/workers --module commonjs --target es2020 --lib es2020 --skipLibCheck --types node`, {
|
|
stdio: 'inherit'
|
|
});
|
|
console.log('✅ Worker scripts built successfully');
|
|
} catch (error) {
|
|
console.error('❌ Failed to build worker scripts:', error.message);
|
|
process.exit(1);
|
|
} |