fix(observabilidade): stub watcher sai limpo com exit 0 para Task 9 systemd
This commit is contained in:
@@ -24,8 +24,11 @@ async function main(): Promise<void> {
|
|||||||
console.log(`[indexer] modo=${mode} db=${dbPath}`)
|
console.log(`[indexer] modo=${mode} db=${dbPath}`)
|
||||||
|
|
||||||
if (mode === '--watch') {
|
if (mode === '--watch') {
|
||||||
startWatcher()
|
console.log(`[indexer] watch mode em ${dbPath}`)
|
||||||
return
|
await indexAll({ dbPath })
|
||||||
|
await startWatcher(dbPath)
|
||||||
|
console.log('[indexer] watcher ainda não implementado (ver Task 8) — saída limpa')
|
||||||
|
process.exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
const start = Date.now()
|
const start = Date.now()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Watcher incremental via chokidar — stub.
|
* Stub — implementação real chega em Task 8 (chokidar).
|
||||||
* Implementação completa na Task 8 (Pipeline: incremental watch + resiliência).
|
* Devolve imediatamente; o CLI imprime aviso e termina com exit 0.
|
||||||
*/
|
*/
|
||||||
export function startWatcher(): never {
|
export async function startWatcher(_dbPath: string): Promise<void> {
|
||||||
throw new Error('watcher não implementado — ver Task 8')
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user