mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
Rename "roles" to "units". Put units in their own folders.
This commit is contained in:
19
lib/units/device/support/push.js
Normal file
19
lib/units/device/support/push.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var syrup = require('syrup')
|
||||
|
||||
var zmq = require('zmq')
|
||||
|
||||
var logger = require('../../../util/logger')
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.define(function(options) {
|
||||
var log = logger.createLogger('device:support:push')
|
||||
|
||||
// Output
|
||||
var push = zmq.socket('push')
|
||||
options.endpoints.push.forEach(function(endpoint) {
|
||||
log.info('Sending output to %s', endpoint)
|
||||
push.connect(endpoint)
|
||||
})
|
||||
|
||||
return push
|
||||
})
|
||||
Reference in New Issue
Block a user