Add watch mode with scheduled polling for automatic re-ingestion#24
Open
Add watch mode with scheduled polling for automatic re-ingestion#24
Conversation
#6) kb ingest --watch --interval 1h re-ingests all registered sources on a loop. Replaces the previous fsnotify-based file watcher with a simpler polling approach that works for all connector types. - Configurable interval (default 1h) - Logs results each cycle, continues on error - Clean shutdown on SIGINT/SIGTERM - Removed fsnotify dependency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0917c05 to
455e4f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #6.
Adds
kb ingest --watch --interval 1h— periodic re-ingestion of all registered sources on a loop. Replaces the previous fsnotify-based file watcher with a simpler polling approach that works for all connector types.Usage
Changes
internal/ingest/watch.go— Rewritten: polling loop with configurable interval, clean shutdowninternal/ingest/watch_test.go— 3 new tests (callback, cancellation, error recovery)cmd/kb/cmd_ingest.go— Added--intervalflag, updated watch mode integrationfsnotifydependencyTest plan
make test— all passkb ingest --source . --watch --interval 10s, verify re-ingestion fires🤖 Generated with Claude Code