mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-22 18:19:17 -05:00
fix: run analyze every 3 hours (#2380)
This commit is contained in:
@@ -288,10 +288,7 @@ func (o *OLAPControllerImpl) Start() (func() error, error) {
|
||||
}
|
||||
|
||||
_, err = o.s.NewJob(
|
||||
gocron.DailyJob(1, gocron.NewAtTimes(
|
||||
// 5AM UTC
|
||||
gocron.NewAtTime(5, 0, 0),
|
||||
)),
|
||||
gocron.DurationJob(3*time.Hour),
|
||||
gocron.NewTask(
|
||||
o.runAnalyze(ctx),
|
||||
),
|
||||
|
||||
@@ -371,10 +371,7 @@ func (tc *TasksControllerImpl) Start() (func() error, error) {
|
||||
}
|
||||
|
||||
_, err = tc.s.NewJob(
|
||||
gocron.DailyJob(1, gocron.NewAtTimes(
|
||||
// 5AM UTC
|
||||
gocron.NewAtTime(5, 0, 0),
|
||||
)),
|
||||
gocron.DurationJob(3*time.Hour),
|
||||
gocron.NewTask(
|
||||
tc.runAnalyze(ctx),
|
||||
),
|
||||
|
||||
@@ -1822,7 +1822,7 @@ func (r *OLAPRepositoryImpl) StoreCELEvaluationFailures(ctx context.Context, ten
|
||||
}
|
||||
|
||||
func (r *OLAPRepositoryImpl) AnalyzeOLAPTables(ctx context.Context) error {
|
||||
const timeout = 1000 * 60 * 30 // 30 minute timeout
|
||||
const timeout = 1000 * 60 * 60 // 60 minute timeout
|
||||
tx, commit, rollback, err := sqlchelpers.PrepareTx(ctx, r.pool, r.l, timeout)
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -3406,7 +3406,7 @@ func (r *TaskRepositoryImpl) ListSignalCompletedEvents(ctx context.Context, tena
|
||||
}
|
||||
|
||||
func (r *TaskRepositoryImpl) AnalyzeTaskTables(ctx context.Context) error {
|
||||
const timeout = 1000 * 60 * 30 // 30 minute timeout
|
||||
const timeout = 1000 * 60 * 60 // 60 minute timeout
|
||||
tx, commit, rollback, err := sqlchelpers.PrepareTx(ctx, r.pool, r.l, timeout)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user