Update translators/styles at startup and on push notifications

Previously, if a translator or style was fixed, people didn't get the
fix until their client checked the repository for updates, which could
take up to 24 hours. Now, in addition to checking once a day, we check
every time Zotero is started and also when we receive a notification
from the streaming server, which happens immediately after a translators
or style is updated on GitHub. To avoid DDoSing ourselves, the
notification includes a random delay (within a given period) before the
update is triggered by the client.

The streaming server connection is now made when either "Automatically
check for updated translators and styles" or "Sync automatically" is
enabled. It can be disabled via the extensions.zotero.streaming.enabled
pref.
This commit is contained in:
Dan Stillman 2017-07-04 18:03:13 -04:00
parent b476c7c7c5
commit 86cf7cbd07
8 changed files with 481 additions and 339 deletions

View file

@ -104,6 +104,7 @@ const xpcomFilesLocal = [
'router',
'schema',
'server',
'streamer',
'style',
'sync',
'sync/syncAPIClient',
@ -113,7 +114,6 @@ const xpcomFilesLocal = [
'sync/syncFullTextEngine',
'sync/syncLocal',
'sync/syncRunner',
'sync/syncStreamer',
'sync/syncUtilities',
'storage',
'storage/storageEngine',