Refactor suppression mechanism for file watcher events

- Updated the suppression logic for file watcher events to use a HashMap instead of a HashSet, allowing for count-based suppression. Each API write increments the count, while each suppressed VFS event decrements it.
- Introduced a new method to register paths in the suppression map, improving the handling of redundant re-snapshots and WebSocket messages.
- Enhanced logging for suppressed events to provide better context during debugging.
- Adjusted related structures and methods across ChangeProcessor, ServeSession, and ApiService to accommodate the new suppression mechanism.
This commit is contained in:
Joe 2026-02-05 18:46:36 -06:00
parent 0968e74208
commit f4f07744c7
4 changed files with 139 additions and 46 deletions

View file

@ -293,7 +293,10 @@ impl TestServeSession {
.serialize(&mut serializer)
.expect("Failed to serialize WriteRequest");
let client = reqwest::blocking::Client::new();
let client = reqwest::blocking::Client::builder()
.timeout(Duration::from_secs(60))
.build()
.expect("Failed to build reqwest client");
let response = client.post(url).body(body).send()?;
if !response.status().is_success() {