Skip to content
Snippets Groups Projects
Commit 4568e9be authored by Kasalehlia's avatar Kasalehlia
Browse files

calendar module pushes updates to the socket now

parent 986e7bb3
No related branches found
No related tags found
No related merge requests found
......@@ -103,12 +103,13 @@ module.exports = function (io) {
io.on('connect', function (sock) {
sock.emit('calendar', Mustache.render(TEMPLATE, CALENDAR));
});
function update() {
getData(8, function (data) {
CALENDAR = data;
io.emit('calendar', Mustache.render(TEMPLATE, CALENDAR));
});
}
update();
setInterval(update, 600000);
}
function update() {
getData(8, function (data) {
CALENDAR = data;
});
}
update();
setInterval(update, 600000);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment