mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-06 13:18:44 +00:00
update InsertRun
This commit is contained in:
parent
ea2bc926f5
commit
a4b76b6544
@ -18,12 +18,7 @@ import (
|
||||
// InsertRun inserts a run
|
||||
// The title will be cut off at 255 characters if it's longer than 255 characters.
|
||||
func InsertRun(ctx context.Context, run *actions_model.ActionRun, jobs []*jobparser.SingleWorkflow) error {
|
||||
ctx, committer, err := db.TxContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer committer.Close()
|
||||
|
||||
return db.WithTx(ctx, func(ctx context.Context) error {
|
||||
index, err := db.GetNextResourceIndex(ctx, "action_run_index", run.RepoID)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -94,7 +89,6 @@ func InsertRun(ctx context.Context, run *actions_model.ActionRun, jobs []*jobpar
|
||||
RunsOn: job.RunsOn(),
|
||||
Status: status,
|
||||
}
|
||||
|
||||
// check job concurrency
|
||||
if job.RawConcurrency != nil && job.RawConcurrency.Group != "" {
|
||||
runJob.RawConcurrencyGroup = job.RawConcurrency.Group
|
||||
@ -143,5 +137,6 @@ func InsertRun(ctx context.Context, run *actions_model.ActionRun, jobs []*jobpar
|
||||
}
|
||||
}
|
||||
|
||||
return committer.Commit()
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user