mirror of https://github.com/status-im/fathom.git
run the aggregator every minute since we only need the last pageview of every visitor for determining distinct realtime visitor count
This commit is contained in:
parent
b5d5996c90
commit
e73a205d26
|
@ -83,10 +83,10 @@ func NewCollectHandler() http.Handler {
|
|||
})
|
||||
}
|
||||
|
||||
// runs the aggregate func every 5 mins
|
||||
// runs the aggregate func every minute
|
||||
func aggregate() {
|
||||
counter.Aggregate()
|
||||
timeout := 5 * time.Minute
|
||||
timeout := 1 * time.Minute
|
||||
|
||||
for {
|
||||
select {
|
||||
|
|
|
@ -13,6 +13,7 @@ func Aggregate() error {
|
|||
// Get unprocessed pageviews
|
||||
pageviews, err := datastore.GetProcessablePageviews()
|
||||
if err != nil && err != datastore.ErrNoResults {
|
||||
log.Error(err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue