Merge branch 'ttpwa-004' into 'development'

Fixes and tidying up the server side of the sockets

See merge request martind2000/traintimesPWA!11
This commit is contained in:
Martin Donnelly 2020-08-20 14:32:12 +00:00
commit a960fa2e07
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/backbone/bundle.js.map
!/db/twitter.db
/db/twitter.db

View File

@ -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);
};