don't panic if no data, improve log (#11581)
This commit is contained in:
parent
ffda908b15
commit
f467d86805
|
@ -1577,7 +1577,7 @@ func (a *ActivityLog) precomputedQueryWorker() error {
|
|||
}
|
||||
|
||||
lastMonth := intent.PreviousMonth
|
||||
a.logger.Info("computing queries", "month", lastMonth)
|
||||
a.logger.Info("computing queries", "month", time.Unix(lastMonth, 0).UTC())
|
||||
|
||||
times, err := a.getMostRecentActivityLogSegment(ctx)
|
||||
if err != nil {
|
||||
|
|
|
@ -1808,6 +1808,10 @@ func TestActivityLog_EndOfMonth(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if intentRaw == nil {
|
||||
t.Fatal("no intent log present")
|
||||
}
|
||||
|
||||
var intent ActivityIntentLog
|
||||
err = intentRaw.DecodeJSON(&intent)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue