'use strict';

exports.on = function(logs) {
  var redis = mainevent.requireModule('redis').createInstance();
  redis.connect();
  redis.client.publish('InsertLog', JSON.stringify(logs), function() {
    redis.client.end();
  });
};

'use strict';

var redis = mainevent.requireModule('redis').createInstance();
redis.connect();

exports.on = function(logs) {
  redis.client.publish('InsertLog', JSON.stringify(logs));
};

Fix attempt: stop creating new clients for each message
Fix attempt: stop creating new clients for each message
