Sha256: b3290d6d2e57f0b2ccb3ad375cd45f42360bfc480fa1b1c4df1fd0aa2bc94bbc
Contents?: true
Size: 671 Bytes
Versions: 33
Compression:
Stored size: 671 Bytes
Contents
'use strict'; var freemem = require('os').freemem; var codec = require('../codec'); var id = Math.random(); var recv = 0; var cmd = require('redis').createClient(); var sub = require('redis').createClient() .on('ready', function() { this.emit('timeline'); }) .on('timeline', function() { var self = this; this.blpop('timeline', 0, function(err, result) { var message = result[1]; if (message) { message = codec.decode(message); ++recv; } self.emit('timeline'); }); }); setInterval(function() { cmd.llen('timeline', function(err, result) { console.error('id', id, 'received', recv, 'free', freemem(), 'llen', result); }); }, 2000);
Version data entries
33 entries across 33 versions & 4 rubygems