From 101b1c51df9a53369d2811f03dec71560b4babf8 Mon Sep 17 00:00:00 2001 From: Azareal Date: Fri, 12 Jul 2019 07:26:05 +1000 Subject: [PATCH] Fix the empty route errors. Updates #53 --- common/counters/requests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/counters/requests.go b/common/counters/requests.go index f2f02211..a3a08de5 100644 --- a/common/counters/requests.go +++ b/common/counters/requests.go @@ -5,7 +5,7 @@ import ( "sync/atomic" "github.com/Azareal/Gosora/common" - "github.com/Azareal/Gosora/query_gen" + qgen "github.com/Azareal/Gosora/query_gen" ) // TODO: Rename this? @@ -22,7 +22,7 @@ type DefaultViewCounter struct { func NewGlobalViewCounter(acc *qgen.Accumulator) (*DefaultViewCounter, error) { counter := &DefaultViewCounter{ currentBucket: 0, - insert: acc.Insert("viewchunks").Columns("count, createdAt").Fields("?,UTC_TIMESTAMP()").Prepare(), + insert: acc.Insert("viewchunks").Columns("count, createdAt, route").Fields("?,UTC_TIMESTAMP(),''").Prepare(), } common.AddScheduledFifteenMinuteTask(counter.Tick) // This is run once every fifteen minutes to match the frequency of the RouteViewCounter //common.AddScheduledSecondTask(counter.Tick)