|
@ -88,6 +88,7 @@ func (TempLowHead3A60 *Temp3A60) getXorm() *xorm.Engine { |
|
|
const ( |
|
|
const ( |
|
|
TempLowHead3A60_AutoQueueWait = 2 * time.Second |
|
|
TempLowHead3A60_AutoQueueWait = 2 * time.Second |
|
|
TempLowHead3A60_AutoQueueStatusNone = "None" |
|
|
TempLowHead3A60_AutoQueueStatusNone = "None" |
|
|
|
|
|
TempLowHead3A60_AutoQueueStatusWait = "Wait" |
|
|
TempLowHead3A60_AutoQueueStatusIng = "Ing" |
|
|
TempLowHead3A60_AutoQueueStatusIng = "Ing" |
|
|
TempLowHead3A60_AutoQueueStatusSuccess = "Success" |
|
|
TempLowHead3A60_AutoQueueStatusSuccess = "Success" |
|
|
TempLowHead3A60_AutoQueueStatusFail = "Fail" |
|
|
TempLowHead3A60_AutoQueueStatusFail = "Fail" |
|
@ -294,7 +295,7 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { |
|
|
|
|
|
|
|
|
for { |
|
|
for { |
|
|
onec := &Temp3A60{} |
|
|
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() |
|
|
session := onec.getXorm().NewSession() |
|
|
defer session.Close() |
|
|
defer session.Close() |
|
@ -308,7 +309,7 @@ func StartQueueTaskPrefixHigHead3A60Temp3A60() { |
|
|
session = session.Where(whereCond) |
|
|
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 { |
|
|
if err == nil && i == 1 { |
|
|
func() { |
|
|
func() { |
|
|
{ |
|
|
{ |
|
|