mirror of
https://github.com/tobi/qmd.git
synced 2026-09-14 20:27:06 +08:00
fix(embed): make session maxDuration env-configurable via QMD_EMBED_MAX_DURATION_MS (#673)
This commit is contained in:
@@ -2,6 +2,18 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- The embed session `maxDuration` is now env-configurable via
|
||||
`QMD_EMBED_MAX_DURATION_MS` (default: 30 min). This prevents large-corpus
|
||||
embeddings from being aborted by the hardcoded 30-minute ceiling (#673).
|
||||
- **build**: Remove `shell: true` from `spawnSync` in `scripts/build.mjs`. On
|
||||
Windows, passing `shell: true` caused `cmd.exe` to misparse `process.execPath`
|
||||
when the Node.js installation path contains spaces (e.g.
|
||||
`C:\Program Files\nodejs\node.exe`). Since `run()` always receives a real
|
||||
binary path + args array, no shell is needed — `spawnSync` can spawn
|
||||
executables directly. (#681)
|
||||
|
||||
## [2.5.3] - 2026-05-28
|
||||
|
||||
### Features
|
||||
|
||||
+1
-1
@@ -1824,7 +1824,7 @@ export async function generateEmbeddings(
|
||||
}
|
||||
|
||||
return { chunksEmbedded, errors: activeErrorCount(), failures: failureList() };
|
||||
}, { maxDuration: 30 * 60 * 1000, name: 'generateEmbeddings' });
|
||||
}, { maxDuration: Number(process.env.QMD_EMBED_MAX_DURATION_MS ?? 30 * 60 * 1000), name: 'generateEmbeddings' });
|
||||
|
||||
return {
|
||||
docsProcessed: totalDocs,
|
||||
|
||||
Reference in New Issue
Block a user