(uid types.Uid, val int, inc bool)
| 808 | } |
| 809 | |
| 810 | func usersUpdateUnread(uid types.Uid, val int, inc bool) { |
| 811 | if globals.usersUpdate == nil || (val == 0 && inc) { |
| 812 | return |
| 813 | } |
| 814 | |
| 815 | upd := &UserCacheReq{UserId: uid, Unread: val, Inc: inc} |
| 816 | if globals.cluster.isRemoteTopic(uid.UserId()) { |
| 817 | // Send request to remote node which owns the user. |
| 818 | globals.cluster.routeUserReq(upd) |
| 819 | } else { |
| 820 | select { |
| 821 | case globals.usersUpdate <- upd: |
| 822 | default: |
| 823 | } |
| 824 | } |
| 825 | } |
| 826 | |
| 827 | // Start tracking a single user. Used for cache management. |
| 828 | // 'add' increments/decrements user's count of subscribed topics. |
no test coverage detected
searching dependent graphs…