From a8b3e2703838242807b83ffa16d91b3f84eafd34 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Thu, 20 Aug 2020 15:31:43 +0100 Subject: [PATCH] Fixes and tidying up the server side of the sockets --- .gitignore | 2 +- server/lib/twitter.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d58cbd5..01683c9 100644 --- a/.gitignore +++ b/.gitignore @@ -151,4 +151,4 @@ fabric.properties /src/es2016/bundle.js.map /src/backbone/bundle.js.map -!/db/twitter.db +/db/twitter.db diff --git a/server/lib/twitter.js b/server/lib/twitter.js index c8f3e53..e209df7 100644 --- a/server/lib/twitter.js +++ b/server/lib/twitter.js @@ -38,6 +38,7 @@ function buildList() { } function startTweetUpdates() { + logger.warn('StartTweetUpdates'); intervalID = setInterval(() => { doTweetUpdates(); }, 10000); @@ -72,5 +73,8 @@ exports.updates = (newEmitter) => { logger.warn('Setting events'); eventEmitter = newEmitter; buildList(); - startTweetUpdates(); + + setInterval(() => { + startTweetUpdates(); + }, 30000); };