mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Insert battery events to the database with soft durability.
This commit is contained in:
parent
cb519dbade
commit
66006db685
1 changed files with 12 additions and 9 deletions
|
@ -128,16 +128,19 @@ dbapi.setDeviceAirplaneMode = function(serial, enabled) {
|
|||
|
||||
dbapi.setDeviceBattery = function(serial, battery) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
battery: {
|
||||
status: battery.status
|
||||
, health: battery.health
|
||||
, source: battery.source
|
||||
, level: battery.level
|
||||
, scale: battery.scale
|
||||
, temp: battery.temp
|
||||
, voltage: battery.voltage
|
||||
battery: {
|
||||
status: battery.status
|
||||
, health: battery.health
|
||||
, source: battery.source
|
||||
, level: battery.level
|
||||
, scale: battery.scale
|
||||
, temp: battery.temp
|
||||
, voltage: battery.voltage
|
||||
}
|
||||
}
|
||||
}))
|
||||
, {
|
||||
durability: 'soft'
|
||||
}))
|
||||
}
|
||||
|
||||
dbapi.setDeviceBrowser = function(serial, browser) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue