diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index 3771615..7366361 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -88,6 +88,7 @@ func (TempLowHead3A60 *Temp3A60) getXorm() *xorm.Engine { const ( TempLowHead3A60_AutoQueueWait = 2 * time.Second TempLowHead3A60_AutoQueueStatusNone = "None" + TempLowHead3A60_AutoQueueStatusWait = "Wait" TempLowHead3A60_AutoQueueStatusIng = "Ing" TempLowHead3A60_AutoQueueStatusSuccess = "Success" TempLowHead3A60_AutoQueueStatusFail = "Fail" @@ -294,7 +295,7 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { for { onec := &Temp3A60{} - hskdb.GetXormAuto().Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusNone).OrderBy("rand()").Get(onec) + hskdb.GetXormAuto().Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusWait).OrderBy("rand()").Get(onec) session := onec.getXorm().NewSession() defer session.Close() @@ -308,7 +309,7 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { session = session.Where(whereCond) } - i, err := session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusNone).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusIng}) + i, err := session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusWait).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusIng}) if err == nil && i == 1 { func() { {