Skip to content

Commit 1390874

Browse files
author
zsbahtiar
committed
feat: add GetRunTasksByJobIDs
1 parent 80377f8 commit 1390874

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

models/actions/run_job.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,11 @@ func GetRunJobsByRunIDs(ctx context.Context, runIDs []int64) ([]*ActionRunJob, e
192192
}
193193
return jobs, nil
194194
}
195+
196+
func GetRunTasksByJobIDs(ctx context.Context, jobIDs []int64) ([]*ActionTask, error) {
197+
var tasks []*ActionTask
198+
if err := db.GetEngine(ctx).In("job_id", jobIDs).Find(&tasks); err != nil {
199+
return nil, err
200+
}
201+
return tasks, nil
202+
}

0 commit comments

Comments
 (0)