-
Notifications
You must be signed in to change notification settings - Fork 126
/
get_group_key_run.go
49 lines (31 loc) · 1.37 KB
/
get_group_key_run.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package repository
import (
"context"
"time"
"github.com/hatchet-dev/hatchet/internal/repository/prisma/db"
"github.com/hatchet-dev/hatchet/internal/repository/prisma/dbsqlc"
)
type ListGetGroupKeyRunsOpts struct {
Status *db.StepRunStatus
}
type UpdateGetGroupKeyRunOpts struct {
RequeueAfter *time.Time
ScheduleTimeoutAt *time.Time
Status *db.StepRunStatus
StartedAt *time.Time
FailedAt *time.Time
FinishedAt *time.Time
CancelledAt *time.Time
CancelledReason *string
Error *string
Output *string
}
type GetGroupKeyRunEngineRepository interface {
// ListStepRunsToRequeue returns a list of step runs which are in a requeueable state.
ListGetGroupKeyRunsToRequeue(ctx context.Context, tenantId string) ([]*dbsqlc.GetGroupKeyRun, error)
ListGetGroupKeyRunsToReassign(ctx context.Context, tenantId string) ([]*dbsqlc.GetGroupKeyRun, error)
AssignGetGroupKeyRunToWorker(ctx context.Context, tenantId, getGroupKeyRunId string) (workerId string, dispatcherId string, err error)
AssignGetGroupKeyRunToTicker(ctx context.Context, tenantId, getGroupKeyRunId string) (tickerId string, err error)
UpdateGetGroupKeyRun(ctx context.Context, tenantId, getGroupKeyRunId string, opts *UpdateGetGroupKeyRunOpts) (*dbsqlc.GetGroupKeyRunForEngineRow, error)
GetGroupKeyRunForEngine(ctx context.Context, tenantId, getGroupKeyRunId string) (*dbsqlc.GetGroupKeyRunForEngineRow, error)
}