fix(be): deny waiting confirmation after confirmed

This commit is contained in:
fiftin 2024-03-12 02:53:29 +01:00
parent 179a2625f7
commit f2c8bc2a4c

View File

@ -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: