Refactor analytics session handler to use File.lastModifiedSync
for _lastPing
#240
Labels
File.lastModifiedSync
for _lastPing
#240
Instead of repeatedly reading the json file to get the last ping value, we should instead refactor that class so that it uses the session json file's last modified timestamp as the
_lastPing
value. When we fetch the session id, we should set the last modified timestamp on the file and only store the session id as a string by itself. This would also remove the overhead of having to parse the json every time we send an event.We will write the the new session id if we find that we need to update it since 30 minutes have passed since the last ping.
The text was updated successfully, but these errors were encountered: