mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-22 22:05:21 +02:00
In-memory reaper. TtlSet needs tests.
This commit is contained in:
@@ -126,6 +126,7 @@ module.exports = function(options) {
|
||||
return false
|
||||
}
|
||||
if (options.filter && !options.filter(device)) {
|
||||
log.info('Filtered out device "%s"', device.id)
|
||||
return false
|
||||
}
|
||||
return listener(device)
|
||||
@@ -407,19 +408,6 @@ module.exports = function(options) {
|
||||
lifecycle.share('Tracker', tracker)
|
||||
})
|
||||
|
||||
// This keeps the devices "present" in the database. It relies on the
|
||||
// provider channel changing on every run so that we never match old
|
||||
// devices.
|
||||
;(function heartbeat() {
|
||||
push.send([
|
||||
wireutil.heartbeat
|
||||
, wireutil.envelope(new wire.ProviderHeartbeatMessage(
|
||||
solo
|
||||
))
|
||||
])
|
||||
setTimeout(heartbeat, options.heartbeatInterval)
|
||||
})()
|
||||
|
||||
lifecycle.observe(function() {
|
||||
[push, sub].forEach(function(sock) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user