mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
Reset owner and reverse forwards when a dead worker restarts. This should prevent ghost owners from staying in the device list.
This commit is contained in:
parent
fe7785f003
commit
4a4b0f26d1
5 changed files with 24 additions and 9 deletions
|
@ -243,16 +243,18 @@ dbapi.setDeviceReverseForwards = function(serial, forwards) {
|
|||
}))
|
||||
}
|
||||
|
||||
dbapi.setDeviceChannel = function(serial, channel) {
|
||||
dbapi.setDeviceReady = function(serial, channel) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
channel: channel
|
||||
, ready: true
|
||||
, owner: null
|
||||
, reverseForwards: []
|
||||
}))
|
||||
}
|
||||
|
||||
dbapi.saveDeviceIdentity = function(serial, identity) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
ready: true
|
||||
, platform: identity.platform
|
||||
platform: identity.platform
|
||||
, manufacturer: identity.manufacturer
|
||||
, operator: identity.operator
|
||||
, model: identity.model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue