mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-17 23:53:25 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user