Fixes and tidying up the server side of the sockets

This commit is contained in:
Martin Donnelly 2020-08-20 15:31:43 +01:00
parent 204d995a4a
commit a8b3e27038
2 changed files with 6 additions and 2 deletions

2
.gitignore vendored
View File

@ -151,4 +151,4 @@ fabric.properties
/src/es2016/bundle.js.map /src/es2016/bundle.js.map
/src/backbone/bundle.js.map /src/backbone/bundle.js.map
!/db/twitter.db /db/twitter.db

View File

@ -38,6 +38,7 @@ function buildList() {
} }
function startTweetUpdates() { function startTweetUpdates() {
logger.warn('StartTweetUpdates');
intervalID = setInterval(() => { intervalID = setInterval(() => {
doTweetUpdates(); doTweetUpdates();
}, 10000); }, 10000);
@ -72,5 +73,8 @@ exports.updates = (newEmitter) => {
logger.warn('Setting events'); logger.warn('Setting events');
eventEmitter = newEmitter; eventEmitter = newEmitter;
buildList(); buildList();
startTweetUpdates();
setInterval(() => {
startTweetUpdates();
}, 30000);
}; };