mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: restore the job logger setup after job cancelation (#1365)
To be able to tag all log-lines with appropriate fields after a workflow run is canceled, we need to restore the JobLogger in the cancelation context.
This commit is contained in:
parent
903bcfa9ef
commit
390686e9a3
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ func newJobExecutor(info jobInfo, sf stepFactory, rc *RunContext) common.Executo
|
|||
if ctx.Err() == context.Canceled {
|
||||
// in case of an aborted run, we still should execute the
|
||||
// post steps to allow cleanup.
|
||||
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Minute)
|
||||
ctx, cancel = context.WithTimeout(WithJobLogger(context.Background(), rc.Run.JobID, rc.String(), rc.Config, &rc.Masks, rc.Matrix), 5*time.Minute)
|
||||
defer cancel()
|
||||
}
|
||||
return postExecutor(ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue