作者 陈志颖

fix:已过期任务重新发布

... ... @@ -710,14 +710,16 @@ func (status ExpiredStatus) Update(task *Task, data map[string]interface{}) erro
func (status ExpiredStatus) Release(task *Task) error {
currentTime := time.Now()
task.ReleaseTime = currentTime
if task.TaskType == TASK_TYPE_BID {
task.ReceiveTime = currentTime
task.TaskStatus = TASK_STATUS_UNDERWAY
task.CurrentStatus = &UnderwayStatus{}
} else {
task.TaskStatus = TASK_STATUS_UNCLAIMED
task.CurrentStatus = &UnClaimedStatus{}
}
task.TaskStatus = TASK_STATUS_UNCLAIMED
task.CurrentStatus = &UnClaimedStatus{}
//if task.TaskType == TASK_TYPE_BID {
// task.ReceiveTime = currentTime
// task.TaskStatus = TASK_STATUS_UNDERWAY
// task.CurrentStatus = &UnderwayStatus{}
//} else {
// task.TaskStatus = TASK_STATUS_UNCLAIMED
// task.CurrentStatus = &UnClaimedStatus{}
//}
return nil
}
... ...