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

Use automation state for devices used by api

This commit is contained in:
Vishal Banthia 2016-11-23 06:45:36 +05:30
parent 42b55889ae
commit a62a6094e4
11 changed files with 45 additions and 10 deletions

View file

@ -30,7 +30,7 @@ module.exports = syrup.serial()
return currentGroup
})
plugin.join = function(newGroup, timeout, identifier) {
plugin.join = function(newGroup, timeout, usage) {
return plugin.get()
.then(function() {
if (currentGroup.group !== newGroup.group) {
@ -57,10 +57,11 @@ module.exports = syrup.serial()
, wireutil.envelope(new wire.JoinGroupMessage(
options.serial
, currentGroup
, usage
))
])
plugin.emit('join', currentGroup, identifier)
plugin.emit('join', currentGroup)
return currentGroup
})
@ -113,7 +114,7 @@ module.exports = syrup.serial()
var reply = wireutil.reply(options.serial)
grouputil.match(ident, message.requirements)
.then(function() {
return plugin.join(message.owner, message.timeout)
return plugin.join(message.owner, message.timeout, message.usage)
})
.then(function() {
push.send([