Refactor hooks to ensure worker is running before processing
- Updated `save-hook.js`, `summary-hook.js`, `context-hook.ts`, `new-hook.ts`, and `save-hook.ts` to include a call to `ensureWorkerRunning()` at the beginning of their main functions. This ensures that the worker is active before any operations are performed. - Cleaned up import statements in the affected files to include the new utility function from `worker-utils.js`. - Minor adjustments to logging and error handling to improve robustness and clarity.
This commit is contained in:
+10
-1
@@ -14,6 +14,15 @@ module.exports = {
|
||||
name: 'claude-mem-worker',
|
||||
script: './plugin/scripts/worker-service.cjs',
|
||||
error_file: '/dev/null',
|
||||
out_file: '/dev/null'
|
||||
out_file: '/dev/null',
|
||||
watch: true,
|
||||
ignore_watch: [
|
||||
'node_modules',
|
||||
'logs',
|
||||
'*.log',
|
||||
'*.db',
|
||||
'*.db-*',
|
||||
'.git'
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user