report query fixes
This commit is contained in:
parent
0779cd35fe
commit
6425196115
|
|
@ -135,10 +135,10 @@ func SetupReportCronJobs(ctx context.Context, reportService *report.Service, out
|
|||
spec string
|
||||
period string
|
||||
}{
|
||||
{
|
||||
spec: "*/60 * * * * *", // Every 5 minutes
|
||||
period: "5min",
|
||||
},
|
||||
// {
|
||||
// spec: "*/60 * * * * *", // Every 5 minutes
|
||||
// period: "5min",
|
||||
// },
|
||||
{
|
||||
spec: "0 0 0 * * *", // Daily at midnight
|
||||
period: "daily",
|
||||
|
|
@ -161,9 +161,9 @@ func SetupReportCronJobs(ctx context.Context, reportService *report.Service, out
|
|||
var from, to time.Time
|
||||
|
||||
switch period {
|
||||
case "5min":
|
||||
from = now.Add(-5 * time.Minute)
|
||||
to = now
|
||||
// case "5min":
|
||||
// from = now.Add(-5 * time.Minute)
|
||||
// to = now
|
||||
case "daily":
|
||||
from = time.Date(now.Year(), now.Month(), now.Day()-1, 0, 0, 0, 0, now.Location())
|
||||
to = time.Date(now.Year(), now.Month(), now.Day()-1, 23, 59, 59, 0, now.Location())
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user