replace Redis with an embedded SQLite string->string KV store (group commit, in-tx events, SQL search)
Build and Push Docker Image / build (push) Successful in 2m44s
Build and Push Docker Image / build (push) Successful in 2m44s
This commit is contained in:
@@ -227,9 +227,9 @@ func (h *Handlers) handleResetAll(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
writeJSON(w, http.StatusOK, map[string]interface{}{
|
||||
"status": "ok",
|
||||
"message": "All watchers reset",
|
||||
"totalFiles": totalCount,
|
||||
"status": "ok",
|
||||
"message": "All watchers reset",
|
||||
"totalFiles": totalCount,
|
||||
"republishedEvents": republishedCount,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ func (p *Poller) Start() error {
|
||||
// consumer state without buying anything. The historical reason for
|
||||
// wiping — "in-memory state is empty, all files re-emit as add" —
|
||||
// stopped being true when HydrateStateFromStorage landed: state is
|
||||
// hydrated from Redis before this runs, so a startup EmitReset would
|
||||
// hydrated from the store before this runs, so a startup EmitReset would
|
||||
// tell consumers to throw out their world without sending the
|
||||
// re-emission they need to rebuild it.
|
||||
//
|
||||
@@ -308,7 +308,7 @@ func (p *Poller) TriggerScanAll() (int, error) {
|
||||
}
|
||||
|
||||
// TriggerReset performs a full reset for a watcher:
|
||||
// 1. Clears the Redis stream and emits a reset event
|
||||
// 1. Clears the file:events stream and emits a reset event
|
||||
// 2. Clears the watcher's state
|
||||
// 3. Performs a full scan (all files are "new")
|
||||
func (p *Poller) TriggerReset(watcherID string) (int, error) {
|
||||
|
||||
@@ -21,7 +21,7 @@ type WatcherConfig struct {
|
||||
// WatcherStatus includes runtime status in API responses
|
||||
type WatcherStatus struct {
|
||||
WatcherConfig
|
||||
Active bool `json:"active"` // Polling goroutine running
|
||||
Active bool `json:"active"` // Polling goroutine running
|
||||
LastScan int64 `json:"lastScan"` // Unix ms timestamp
|
||||
FileCount int `json:"fileCount"` // Files found in last scan
|
||||
IsScanning bool `json:"isScanning"` // Currently scanning
|
||||
|
||||
Reference in New Issue
Block a user