Skip to content

Commit 443edb2

Browse files
committed
feat(replay): add prioritySeconds to StandardTaskForm and TestTaskService
1 parent 5100bd8 commit 443edb2

File tree

2 files changed

+18
-0
lines changed
  • apps/webapp/app

2 files changed

+18
-0
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ function StandardTaskForm({
409409
tags,
410410
version,
411411
machine,
412+
prioritySeconds,
412413
},
413414
] = useForm({
414415
id: "test-task",
@@ -730,6 +731,12 @@ function StandardTaskForm({
730731
<Hint>Delays run by a specific duration.</Hint>
731732
<FormError id={delaySeconds.errorId}>{delaySeconds.error}</FormError>
732733
</InputGroup>
734+
<InputGroup>
735+
<Label variant="small">Priority</Label>
736+
<DurationPicker name={prioritySeconds.name} id={prioritySeconds.id} />
737+
<Hint>Sets the priority of the run. Higher values mean higher priority.</Hint>
738+
<FormError id={prioritySeconds.errorId}>{prioritySeconds.error}</FormError>
739+
</InputGroup>
733740
<InputGroup>
734741
<Label variant="small">TTL</Label>
735742
<DurationPicker
@@ -872,6 +879,7 @@ function ScheduledTaskForm({
872879
tags,
873880
version,
874881
machine,
882+
prioritySeconds,
875883
},
876884
] = useForm({
877885
id: "test-task-scheduled",
@@ -1237,6 +1245,14 @@ function ScheduledTaskForm({
12371245
<Hint>Limits concurrency by creating a separate queue for each value of the key.</Hint>
12381246
<FormError id={concurrencyKey.errorId}>{concurrencyKey.error}</FormError>
12391247
</InputGroup>
1248+
<InputGroup>
1249+
<Label htmlFor={prioritySeconds.id} variant="small">
1250+
Priority
1251+
</Label>
1252+
<DurationPicker name={prioritySeconds.name} id={prioritySeconds.id} />
1253+
<Hint>Sets the priority of the run. Higher values mean higher priority.</Hint>
1254+
<FormError id={prioritySeconds.errorId}>{prioritySeconds.error}</FormError>
1255+
</InputGroup>
12401256
<InputGroup>
12411257
<Label htmlFor={ttlSeconds.id} variant="small">
12421258
TTL

apps/webapp/app/v3/services/testTask.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class TestTaskService extends BaseService {
2929
tags: data.tags,
3030
machine: data.machine,
3131
lockToVersion: data.version === "latest" ? undefined : data.version,
32+
priority: data.prioritySeconds,
3233
},
3334
});
3435

@@ -66,6 +67,7 @@ export class TestTaskService extends BaseService {
6667
tags: data.tags,
6768
machine: data.machine,
6869
lockToVersion: data.version === "latest" ? undefined : data.version,
70+
priority: data.prioritySeconds,
6971
},
7072
},
7173
{ customIcon: "scheduled" }

0 commit comments

Comments
 (0)