write analytics before exiting

v1.18.x
Barış Soner Uşaklı
parent 8abef4c101
commit 1d15449076

@ -146,6 +146,10 @@ function shutdown(code) {
}, },
function (next) { function (next) {
winston.info('[app] Web server closed to connections.'); winston.info('[app] Web server closed to connections.');
require('./analytics').writeData(next);
},
function (next) {
winston.info('[app] Live analytics saved.');
require('./database').close(next); require('./database').close(next);
}, },
], function (err) { ], function (err) {

Loading…
Cancel
Save