mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
fix: right log index out of steps
This commit is contained in:
parent
7e01f8ce66
commit
dcc552011e
@ -93,7 +93,7 @@ func (task *Task) FullSteps() []*TaskStep {
|
|||||||
LogLength: task.LogLength,
|
LogLength: task.LogLength,
|
||||||
Started: task.Started,
|
Started: task.Started,
|
||||||
}
|
}
|
||||||
if firstStep != nil {
|
if firstStep != nil && firstStep.LogLength > 0 {
|
||||||
headStep.LogLength = firstStep.LogIndex
|
headStep.LogLength = firstStep.LogIndex
|
||||||
headStep.Stopped = firstStep.Started
|
headStep.Stopped = firstStep.Started
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ func (task *Task) FullSteps() []*TaskStep {
|
|||||||
Name: "Complete job",
|
Name: "Complete job",
|
||||||
Stopped: task.Stopped,
|
Stopped: task.Stopped,
|
||||||
}
|
}
|
||||||
if lastStep != nil {
|
if lastStep != nil && lastStep.Result != runnerv1.Result_RESULT_UNSPECIFIED {
|
||||||
tailStep.LogIndex = lastStep.LogIndex + lastStep.LogLength
|
tailStep.LogIndex = lastStep.LogIndex + lastStep.LogLength
|
||||||
tailStep.LogLength = task.LogLength - tailStep.LogIndex
|
tailStep.LogLength = task.LogLength - tailStep.LogIndex
|
||||||
tailStep.Started = lastStep.Stopped
|
tailStep.Started = lastStep.Stopped
|
||||||
|
Loading…
Reference in New Issue
Block a user