fix(embed): make session maxDuration env-configurable via QMD_EMBED_MAX_DURATION_MS (#673)

This commit is contained in:
Tobias Lütke
2026-05-31 23:15:37 +00:00
parent 5323277086
commit 961d1e45de
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -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
View File
@@ -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,