-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGES: There should be no breaking changes, but as it is a full rewrite, let's act as if it does. Among the changes : - Realtime now correctly reconnect if the computer goes to sleep, whatever the time gone offline. - We do not try on attempt every 200ms 60 times anymore. There is an exponential backoff mechanism. The reconnection may take up to 5 minutes (worst case scenario). - It now allows to specify an id when subscribing to the CREATED event. This was needed for cozy-notes. - It allows to subscribe to all events for a doctype (and optionally an id). The socket with the stack was subscribing to all events anyways. - The code is longer but should be way simplier. I deleted the extra layer with Socket.js which was mostly boilerplate and additional complexity for asynchroneous events. - The subscriptions are now handled by a specific class instead of doing shameful magic with the internal of MicroEE. - The retry logic has an external class, easying to tweak the values in the future. - There are Minilog logs on level info or debug that can be activated when needed (same inside the main test file, because sometimes it may help). Only warnings are activated by default. - Deprecation of CozyRealtime.send() (which was not sending something on the websocket, despites its name) in favor of CozyRealtime.sendNotification()
- Loading branch information
Showing
15 changed files
with
2,392 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.