Skip to content

Commit 1dcb50c

Browse files
authored
hotfix: priority on schedule workflow (#1556)
* hotfix: priority on schedule workflow * fix: build
1 parent 65187c4 commit 1dcb50c

File tree

7 files changed

+198
-198
lines changed

7 files changed

+198
-198
lines changed

api-contracts/workflows/workflows.proto

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ message ScheduleWorkflowRequest {
157157
optional string additional_metadata = 8;
158158

159159
// (optional) the priority of the workflow
160-
int32 priority = 9;
161-
160+
optional int32 priority = 9;
162161
}
163162

164163
// ScheduledWorkflow represents a scheduled workflow.

internal/services/admin/contracts/workflows.pb.go

Lines changed: 154 additions & 153 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/services/admin/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ func (a *AdminServiceImpl) ScheduleWorkflow(ctx context.Context, req *contracts.
376376
ScheduledTriggers: dbSchedules,
377377
Input: []byte(req.Input),
378378
AdditionalMetadata: additionalMetadata,
379-
Priority: &req.Priority,
379+
Priority: req.Priority,
380380
},
381381
)
382382

pkg/client/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func (a *adminClientImpl) ScheduleWorkflow(workflowName string, fs ...ScheduleOp
194194
Name: workflowName,
195195
Schedules: pbSchedules,
196196
Input: string(inputBytes),
197-
Priority: *opts.priority,
197+
Priority: opts.priority,
198198
})
199199

200200
if err != nil {

pkg/repository/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ type CreateWorkflowSchedulesOpts struct {
9191
Input []byte
9292
AdditionalMetadata []byte
9393

94-
Priority *int32 `validate:"omitempty,min=1,max=3"`
94+
Priority *int32 `validate:"omitnil,min=1,max=3"`
9595
}
9696

9797
type CreateScheduledWorkflowRunForWorkflowOpts struct {

sdks/python/hatchet_sdk/contracts/workflows_pb2.py

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/typescript/src/protoc/workflows/workflows.ts

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)