mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:23:28 +02:00
Add provider to device data.
This commit is contained in:
@@ -26,14 +26,16 @@ module.exports.saveDeviceLog = function(serial, entry) {
|
||||
|
||||
module.exports.saveDeviceStatus = function(serial, status) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
status: status
|
||||
status: status.status
|
||||
, provider: status.provider
|
||||
, statusChangedAt: r.now()
|
||||
}))
|
||||
.then(function(stats) {
|
||||
if (stats.skipped) {
|
||||
return db.run(r.table('devices').insert({
|
||||
serial: serial
|
||||
, status: status
|
||||
, provider: status.provider
|
||||
, status: status.status
|
||||
, statusChangedAt: r.now()
|
||||
, createdAt: r.now()
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user