Commit ad4956e1 by Chavee Issariyapat

reuse seneca instance

parent b68560ee
......@@ -6,22 +6,35 @@ var LRU = require("lru-cache") ,
maxAge: 1000 * 60 * 5
});
var client_wf = require('seneca')()
.use('seneca-amqp-transport')
.client({
var senecaAMQP = require('seneca')().use('seneca-amqp-transport');
var client_wf = senecaAMQP.client({
type: 'amqp',
pin: 'cmd:wf',
url: 'amqp://'+config.get('rabbitmq_username')+':'+config.get('rabbitmq_password')+'@'+config.get('rabbitmq_host')+':'+config.get('rabbitmq_port')
});
var client_push = require('seneca')()
.use('seneca-amqp-transport')
.client({
});
var client_push = senecaAMQP.client({
type: 'amqp',
pin: 'cmd:push',
url: 'amqp://'+config.get('rabbitmq_username')+':'+config.get('rabbitmq_password')+'@'+config.get('rabbitmq_host')+':'+config.get('rabbitmq_port')
});
});
// var client_wf = require('seneca')()
// .use('seneca-amqp-transport')
// .client({
// type: 'amqp',
// pin: 'cmd:wf',
// url: 'amqp://'+config.get('rabbitmq_username')+':'+config.get('rabbitmq_password')+'@'+config.get('rabbitmq_host')+':'+config.get('rabbitmq_port')
// });
// var client_push = require('seneca')()
// .use('seneca-amqp-transport')
// .client({
// type: 'amqp',
// pin: 'cmd:push',
// url: 'amqp://'+config.get('rabbitmq_username')+':'+config.get('rabbitmq_password')+'@'+config.get('rabbitmq_host')+':'+config.get('rabbitmq_port')
// });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment