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:
parent
334490d878
commit
fa7437a445
3 changed files with 65 additions and 23 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue