fix(scheduling): fire a schedule's capture into its owning organisation
This commit is contained in:
1 parent
b705019eb8
commit
334bb8cc40
18 files changed
+77
-21
No files matched your search
@@ -469,7 +469,7 @@ const startRequestedRuns = `-- name: StartRequestedRuns :many
|
||||
UPDATE schedule_runs r SET result = 'running', started_at = $1
|
||||
FROM schedules s
|
||||
WHERE r.result = 'pending' AND s.id = r.schedule_id
|
||||
RETURNING r.id, r.schedule_id, r.scheduled_for, s.name, s.built_in
|
||||
RETURNING r.id, r.schedule_id, r.scheduled_for, s.name, s.built_in, s.owner_id
|
||||
`
|
||||
|
||||
type StartRequestedRunsRow struct {
|
||||
@@ -478,6 +478,7 @@ type StartRequestedRunsRow struct {
|
||||
ScheduledFor time.Time
|
||||
Name string
|
||||
BuiltIn bool
|
||||
OwnerID string
|
||||
}
|
||||
|
||||
func (q *Queries) StartRequestedRuns(ctx context.Context, startedAt pgtype.Timestamptz) ([]StartRequestedRunsRow, error) {
|
||||
@@ -495,6 +496,7 @@ func (q *Queries) StartRequestedRuns(ctx context.Context, startedAt pgtype.Times
|
||||
&i.ScheduledFor,
|
||||
&i.Name,
|
||||
&i.BuiltIn,
|
||||
&i.OwnerID,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user