mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
Merge pull request #1056 from denis99999/group-feature
Addition of a powerful system for device booking & partitioning
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
var util = require('util')
|
||||
|
||||
var syrup = require('stf-syrup')
|
||||
@@ -117,6 +121,7 @@ module.exports = syrup.serial()
|
||||
if (plugin.isRunning()) {
|
||||
activeServer.close()
|
||||
activeServer.end()
|
||||
activeServer = null
|
||||
}
|
||||
})
|
||||
|
||||
@@ -131,7 +136,7 @@ module.exports = syrup.serial()
|
||||
}
|
||||
|
||||
lifecycle.observe(plugin.stop)
|
||||
group.on('leave', plugin.end)
|
||||
group.on('leave', plugin.stop)
|
||||
|
||||
router
|
||||
.on(wire.ConnectStartMessage, function(channel) {
|
||||
@@ -163,7 +168,7 @@ module.exports = syrup.serial()
|
||||
})
|
||||
.on(wire.ConnectStopMessage, function(channel) {
|
||||
var reply = wireutil.reply(options.serial)
|
||||
plugin.end()
|
||||
plugin.stop()
|
||||
.then(function() {
|
||||
push.send([
|
||||
channel
|
||||
@@ -187,6 +192,5 @@ module.exports = syrup.serial()
|
||||
})
|
||||
})
|
||||
|
||||
return plugin.start()
|
||||
.return(plugin)
|
||||
return(plugin)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user