Wait 5 seconds after launch for translator updates (bundled and repo)
This isn't ideal, since it could cause an unexplained delay a few seconds after launch on slow systems, but it's better than delaying startup. We'll make this non-blocking post-3.0.
This commit is contained in:
parent
315d9ecbcb
commit
d61fdeda4c
2 changed files with 16 additions and 17 deletions
|
@ -205,26 +205,26 @@ Zotero.Schema = new function(){
|
|||
Zotero.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
var up4 = this.updateBundledFiles();
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug(e);
|
||||
Zotero.logError(e);
|
||||
}
|
||||
|
||||
if (up2 || up3 || up4) {
|
||||
// Run a manual scraper update if upgraded and pref set
|
||||
if (Zotero.Prefs.get('automaticScraperUpdates')){
|
||||
this.updateFromRepository(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
Zotero.UnresponsiveScriptIndicator.enable();
|
||||
}
|
||||
return up1 || up2 || up3 || up4;
|
||||
|
||||
// After a delay, start update of bundled files and repo updates
|
||||
setTimeout(function () {
|
||||
var up = Zotero.Schema.updateBundledFiles();
|
||||
if (up) {
|
||||
// Run a manual scraper update if upgraded and pref set
|
||||
if (Zotero.Prefs.get('automaticScraperUpdates')) {
|
||||
Zotero.Schema.updateFromRepository(2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Zotero.Schema.updateFromRepository();
|
||||
}
|
||||
}, 5000);
|
||||
|
||||
return up1 || up2 || up3;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -642,7 +642,6 @@ const ZOTERO_CONFIG = {
|
|||
}
|
||||
|
||||
Zotero.DB.startDummyStatement();
|
||||
Zotero.Schema.updateFromRepository();
|
||||
|
||||
// Populate combined tables for custom types and fields -- this is likely temporary
|
||||
if (!upgraded && !updated) {
|
||||
|
|
Loading…
Reference in a new issue