Closed marandaneto closed 8 months ago
Hey @marandaneto I noticed this got closed with #177. Wondering if you can provide any more context on how offline support is improved. Is the queue now cached on the file system? Is there any limitation to the number events that this queue can store or length of time that an app can be offline for?
Thanks for working on this!!
All events will be cached if the device is offline, there's a timer flushing the events to the network, and the timer is configurable via flushInterval
.
If the device is offline, the events will remain cached, once the timer is triggered and there's network, the events will be sent and deleted from the local storage.
Previously the events were deleted from the local storage even if flusing failed, so events were lost anyways.
Description
Context https://posthog.com/questions/offline-usage-1
It partially does. It persists the queue. The only thing is, that it doesn't:
this is nice to have since network connectivity callbacks only tell there's a cellphone signal or wifi connected but not necessarily the internet.
this is a must, if an app is offline first, and it's always offline, the queue will try to be flushed and will remove the items from the queue, but it will fail since there's no connection at all, that slice of the queue will be lost if not restored.