Skip to content
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

feat: refresh timeout #495

Merged
merged 19 commits into from
May 16, 2024
Merged

feat: refresh timeout #495

merged 19 commits into from
May 16, 2024

Conversation

grutt
Copy link
Contributor

@grutt grutt commented May 14, 2024

Description

Timeouts have been fixed intervals which does not afford flexibility during execution. Adds support to increase the timeout during step runtime.

Fixes HAT-121

Type of change

  • Documentation change (pure documentation change)
  • New feature (non-breaking change which adds functionality)

What's Changed

  • add Refresh Timeout methods and protos

@grutt grutt requested a review from abelanger5 May 14, 2024 20:55
Copy link

vercel bot commented May 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 2:06pm

tenant := ctx.Value("tenant").(*dbsqlc.Tenant)
tenantId := sqlchelpers.UUIDToStr(tenant.ID)

stepRun, err := d.repo.StepRun().RefreshTimeoutAt(ctx, tenantId, request.StepRunId, request.IncrementTimeoutBy)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abelanger5 is there a convenient way to validate the IncrementTimeoutBy string?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the duration validator within RefreshTimeoutAt in an opts struct.

internal/repository/prisma/step_run.go Outdated Show resolved Hide resolved
tenant := ctx.Value("tenant").(*dbsqlc.Tenant)
tenantId := sqlchelpers.UUIDToStr(tenant.ID)

stepRun, err := d.repo.StepRun().RefreshTimeoutAt(ctx, tenantId, request.StepRunId, request.IncrementTimeoutBy)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the duration validator within RefreshTimeoutAt in an opts struct.

@abelanger5 abelanger5 merged commit e6617e1 into main May 16, 2024
19 checks passed
@abelanger5 abelanger5 deleted the feat--refresh-timeout branch May 16, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants