Do not try to fetch latest posts in offline mode

This commit is contained in:
Alfredo Cardigliano 2021-07-09 16:23:15 +02:00
parent f02986dff5
commit 15a2a34771

View file

@ -100,6 +100,11 @@ function blog_utils.updateRedis(newPosts)
end
function blog_utils.fetchLatestPosts()
if ntop.isOffline() then
return
end
local response
local now = os.time()
local next_fetch = ntop.getPref(BLOG_NEXT_FEED_UPDATE)