1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Error if unable to resolve endpoints.

This commit is contained in:
Simo Kinnunen 2014-12-18 16:29:15 +09:00
parent 2f8116dfe6
commit eb841161ac
6 changed files with 66 additions and 24 deletions

View file

@ -12,15 +12,15 @@ module.exports = syrup.serial()
// Output
var push = zmq.socket('push')
Promise.map(options.endpoints.push, function(endpoint) {
return srv.resolve(endpoint).then(function(records) {
return srv.attempt(records, function(record) {
log.info('Sending output to "%s"', record.url)
push.connect(record.url)
return Promise.resolve(true)
return Promise.map(options.endpoints.push, function(endpoint) {
return srv.resolve(endpoint).then(function(records) {
return srv.attempt(records, function(record) {
log.info('Sending output to "%s"', record.url)
push.connect(record.url)
return Promise.resolve(true)
})
})
})
})
return push
.return(push)
})