From 174405defb57be4a9719e15e86d2aeda1d7ae392 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 25 Apr 2016 00:04:42 -0400 Subject: [PATCH] Fix feed refresh interval calculation --- chrome/content/zotero/xpcom/data/feeds.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/feeds.js b/chrome/content/zotero/xpcom/data/feeds.js index b8f2028cc2..fe4e1ffc2b 100644 --- a/chrome/content/zotero/xpcom/data/feeds.js +++ b/chrome/content/zotero/xpcom/data/feeds.js @@ -163,7 +163,7 @@ Zotero.Feeds = new function() { Zotero.debug("Scheduling next feed update"); let sql = "SELECT ( CASE " + "WHEN lastCheck IS NULL THEN 0 " - + "ELSE strftime('%s', lastCheck) + refreshInterval*3600 - strftime('%s', 'now') " + + "ELSE strftime('%s', lastCheck) + refreshInterval * 60 - strftime('%s', 'now') " + "END ) AS nextCheck " + "FROM feeds WHERE refreshInterval IS NOT NULL " + "ORDER BY nextCheck ASC LIMIT 1"; @@ -176,7 +176,7 @@ Zotero.Feeds = new function() { if (nextCheck !== false) { nextCheck = nextCheck > 0 ? nextCheck * 1000 : 0; - Zotero.debug("Next feed check in " + nextCheck / 60000 + " minutes"); + Zotero.debug("Next feed check in " + (nextCheck / 1000) + " seconds"); this._nextFeedCheck = Zotero.Promise.delay(nextCheck); Zotero.Promise.all([this._nextFeedCheck, globalFeedCheckDelay]) .then(() => {