Skip to content

Commit

Permalink
Update translators/styles at startup and on push notifications
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dstillman committed Jul 4, 2017
1 parent b476c7c commit 86cf7cb
Show file tree
Hide file tree
Showing 8 changed files with 473 additions and 331 deletions.
2 changes: 1 addition & 1 deletion chrome/content/zotero/preferences/preferences_general.js
Expand Up @@ -40,7 +40,7 @@ Zotero_Preferences.General = {


updateTranslators: Zotero.Promise.coroutine(function* () {
var updated = yield Zotero.Schema.updateFromRepository(true);
var updated = yield Zotero.Schema.updateFromRepository(Zotero.Schema.REPO_UPDATE_MANUAL);
var button = document.getElementById('updateButton');
if (button) {
if (updated===-1) {
Expand Down

0 comments on commit 86cf7cb

Please sign in to comment.