8000 fix: don't requeue step runs immediately by abelanger5 · Pull Request #582 · hatchet-dev/hatchet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: don't requeue step runs immediately #582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/repository/prisma/step_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ func (s *stepRunEngineRepository) assignStepRunToWorkerAttempt(ctx context.Conte

if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
return nil, repository.ErrNoWorkerAvailable
s.l.Warn().Err(err).Msg("no rows returned from worker assign")
}

return nil, fmt.Errorf("query to assign worker failed: %w", err)
Expand Down
6 changes: 5 additions & 1 deletion internal/services/controllers/jobs/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,11 @@ func (ec *JobsControllerImpl) queueStepRun(ctx context.Context, tenantId, stepId

servertel.WithStepRunModel(span, stepRun)

updateStepOpts := &repository.UpdateStepRunOpts{}
requeueAfterTime := time.Now().Add(4 * time.Second).UTC()

updateStepOpts := &repository.UpdateStepRunOpts{
RequeueAfter: &requeueAfterTime,
}

// set scheduling timeout
if scheduleTimeoutAt := stepRun.StepRun.ScheduleTimeoutAt.Time; scheduleTimeoutAt.IsZero() {
Expand Down
Loading
0