1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Add more advanced filtering to the device tracker. Make the group tracker work properly.

This commit is contained in:
Simo Kinnunen 2014-04-08 13:48:07 +09:00
parent 334490d878
commit fa7437a445
3 changed files with 65 additions and 23 deletions

View file

@ -1,3 +1,5 @@
var r = require('rethinkdb')
module.exports = {
users: {
primaryKey: 'email'
@ -5,8 +7,8 @@ module.exports = {
, devices: {
primaryKey: 'serial'
, indexes: {
ownerEmail: function(device) {
return device('owner')('email')
owner: function(device) {
return r.branch(device('present'), device('owner')('email'), r.literal())
}
, lastHeartbeatAt: null
}