We now subscribe to created, updated and deleted realtime events
on io.cozy.files documents to detect as soon as possible when
documents were modified on the remote Cozy.
When we received one of these events, we'll enqueue a remote watcher
run request and use our classic mechanism to fetch and merge remote
changes.
Since fetching and merging remote changes consumes time and resources,
we'll limit the number of requests enqueued via a debounce mechanism:
the first and last events will enqueue requests
an event will be considered as the last of a group if we haven't
received new events in the last 200 ms
we'll enqueue a request at least every 5 s to avoid long idle
periods when receiving lots of events (keep in mind that only one
request is kept in the queue at any time)
Please make sure the following boxes are checked:
[ ] PR is not too big
[x] it improves UX & DX in some way
[x] it includes unit tests matching the implementation changes
[x] it includes scenarios matching a new behaviour or has been manually tested
We now subscribe to
created
,updated
anddeleted
realtime events onio.cozy.files
documents to detect as soon as possible when documents were modified on the remote Cozy.When we received one of these events, we'll enqueue a remote watcher run request and use our classic mechanism to fetch and merge remote changes.
Since fetching and merging remote changes consumes time and resources, we'll limit the number of requests enqueued via a debounce mechanism:
Please make sure the following boxes are checked: