mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
fix(be): deny waiting confirmation after confirmed
This commit is contained in:
parent
179a2625f7
commit
f2c8bc2a4c
@ -45,17 +45,19 @@ func (t *TaskRunner) SetStatus(status lib.TaskStatus) {
|
||||
}
|
||||
|
||||
switch t.Task.Status { // check old status
|
||||
case lib.TaskConfirmed:
|
||||
if status == lib.TaskWaitingConfirmation {
|
||||
return
|
||||
}
|
||||
case lib.TaskRunningStatus:
|
||||
if status == lib.TaskWaitingStatus {
|
||||
return
|
||||
}
|
||||
break
|
||||
case lib.TaskStoppingStatus:
|
||||
if status == lib.TaskWaitingStatus || status == lib.TaskRunningStatus {
|
||||
//panic("stopping TaskRunner cannot be " + status)
|
||||
return
|
||||
}
|
||||
break
|
||||
case lib.TaskSuccessStatus:
|
||||
case lib.TaskFailStatus:
|
||||
case lib.TaskStoppedStatus:
|
||||
|
Loading…
Reference in New Issue
Block a user