Private
Public Access
1
0

scores: clickhouse support
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-20 19:41:02 -07:00
parent 5682c86837
commit 6df51fc19f
9 changed files with 309 additions and 58 deletions

View File

@@ -36,7 +36,7 @@ func (d *ClickHouse) ServerAnswerCounts(ctx context.Context, serverIP string, da
ctx, span := tracing.Tracer().Start(ctx, "ServerAnswerCounts")
defer span.End()
conn := d.conn
conn := d.Logs
log := logger.Setup().With("server", serverIP)
@@ -100,7 +100,7 @@ func (d *ClickHouse) AnswerTotals(ctx context.Context, qtype string, days int) (
defer span.End()
// queries by UserCC / Qtype for the ServerIP
rows, err := d.conn.Query(clickhouse.Context(ctx,
rows, err := d.Logs.Query(clickhouse.Context(ctx,
clickhouse.WithSpan(span.SpanContext()),
), `
select UserCC,Qtype,sum(queries) as queries