mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 00:03:28 +02:00
Save device logs to rethinkdb.
This commit is contained in:
@@ -13,6 +13,17 @@ module.exports.saveUserAfterLogin = function(user) {
|
||||
}))
|
||||
}
|
||||
|
||||
module.exports.saveDeviceLog = function(serial, entry) {
|
||||
return db.run(r.table('logs').insert({
|
||||
serial: entry.serial
|
||||
, timestamp: r.epochTime(entry.timestamp)
|
||||
, priority: entry.priority
|
||||
, tag: entry.tag
|
||||
, pid: entry.pid
|
||||
, message: entry.message
|
||||
}))
|
||||
}
|
||||
|
||||
module.exports.saveDeviceStatus = function(serial, status) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
status: status
|
||||
|
||||
Reference in New Issue
Block a user