1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +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

@ -152,7 +152,7 @@ dbapi.saveDeviceInitialState = function(serial, device) {
, ready: false
, reverseForwards: []
, remoteConnect: false
, remoteDebugUrl: null
, remoteConnectUrl: null
}
return db.run(r.table('devices').get(serial).update(data))
.then(function(stats) {
@ -167,14 +167,14 @@ dbapi.saveDeviceInitialState = function(serial, device) {
dbapi.setDeviceConnectUrl = function(serial, url) {
return db.run(r.table('devices').get(serial).update({
remoteDebugUrl: url
remoteConnectUrl: url
, remoteConnect: true
}))
}
dbapi.unsetDeviceConnectUrl = function(serial, url) {
return db.run(r.table('devices').get(serial).update({
remoteDebugUrl: null
remoteConnectUrl: null
, remoteConnect: false
}))
}