Skip to content

Commit 9a0c5ac

Browse files
authored
hotfix: priority on cron workflow for v0 (#1558)
1 parent 3ee5a1e commit 9a0c5ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/repository/postgres/workflow.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,11 @@ func (r *workflowEngineRepository) createWorkflowVersionTxs(ctx context.Context,
10901090
}
10911091

10921092
for _, cronTrigger := range opts.CronTriggers {
1093+
var priority pgtype.Int4
1094+
1095+
if opts.DefaultPriority != nil {
1096+
priority = sqlchelpers.ToInt(*opts.DefaultPriority)
1097+
}
10931098

10941099
_, err := r.queries.CreateWorkflowTriggerCronRef(
10951100
ctx,
@@ -1102,8 +1107,7 @@ func (r *workflowEngineRepository) createWorkflowVersionTxs(ctx context.Context,
11021107
String: "",
11031108
Valid: true,
11041109
},
1105-
// TODO: Check this is right
1106-
Priority: sqlchelpers.ToInt(*opts.DefaultPriority),
1110+
Priority: priority,
11071111
},
11081112
)
11091113

0 commit comments

Comments
 (0)