Skip to content

Commit ff1f94c

Browse files
committed
added last redis save stat
1 parent 6a29cdd commit ff1f94c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ io.sockets.on('connection', function(socket){
111111
data['globalConnectedClients'] = reply;
112112
});
113113

114+
multi.lastsave(function(err, reply){
115+
var now = (new Date().getTime()) / 1000;
116+
data['lastStateSave'] = ((now - reply) / 60).toFixed(1);
117+
});
118+
114119
multi.exec(function(err, replies){
115120
socket.emit('stats', data);
116121
netUsage += sizeof(data);

0 commit comments

Comments
 (0)