1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

Modify APIs from Aysnc -> Sync using timeout

This commit is contained in:
Vishal Banthia 2015-12-14 14:02:20 +09:00
parent d67d06a19f
commit a6266931ad
10 changed files with 354 additions and 239 deletions

View file

@ -142,15 +142,16 @@ module.exports = syrup.serial()
channel
, reply.okay(url)
])
// Update DB
push.send([
wireutil.global
channel
, wireutil.envelope(new wire.ConnectStartedMessage(
options.serial
, url
))
])
log.info('Remote Connect Started for device "%s" at "%s"', options.serial, url)
log.important('Remote Connect Started for device "%s" at "%s"', options.serial, url)
})
.catch(function(err) {
log.error('Unable to start remote connect service', err.stack)
@ -170,12 +171,12 @@ module.exports = syrup.serial()
])
// Update DB
push.send([
wireutil.global
channel
, wireutil.envelope(new wire.ConnectStoppedMessage(
options.serial
))
])
log.info('Remote Connect Stopped for device "%s"', options.serial)
log.important('Remote Connect Stopped for device "%s"', options.serial)
})
.catch(function(err) {
log.error('Failed to stop connect service', err.stack)