test
This commit is contained in:
parent
6b6b33e078
commit
ae5d619cfb
1
def.go
1
def.go
@ -115,6 +115,7 @@ const (
|
|||||||
SQLCWMsgWorkers = 6
|
SQLCWMsgWorkers = 6
|
||||||
SQLIdentifyMsgWorkers = 6
|
SQLIdentifyMsgWorkers = 6
|
||||||
SQLJobWorkers = 3
|
SQLJobWorkers = 3
|
||||||
|
SQLJobSliceSize = 25
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
4
sql.go
4
sql.go
@ -1385,10 +1385,10 @@ func loadCurrentJobs() ([]Job, error) {
|
|||||||
}
|
}
|
||||||
defer tx.Rollback()
|
defer tx.Rollback()
|
||||||
|
|
||||||
stmt, err := tx.Prepare("SELECT o.id, o.obj_sub_type_id, j.payload FROM obj_job j, obj o WHERE j.obj_id = o.id AND j.status = ? AND j.schedule <= ? ORDER BY j.prio ASC LIMIT 10 FOR UPDATE;")
|
stmt, err := tx.Prepare("SELECT o.id, o.obj_sub_type_id, j.payload FROM obj_job j, obj o WHERE j.obj_id = o.id AND j.status = ? AND j.schedule <= ? ORDER BY j.prio ASC LIMIT ? FOR UPDATE;")
|
||||||
logOnError(err, "loadCurrentJobs : prepare select statement")
|
logOnError(err, "loadCurrentJobs : prepare select statement")
|
||||||
|
|
||||||
rows, err := stmt.Query(objJobStatusNew, time.Now())
|
rows, err := stmt.Query(objJobStatusNew, time.Now(), SQLJobSliceSize)
|
||||||
logOnError(err, "loadCurrentJobs : query select statement")
|
logOnError(err, "loadCurrentJobs : query select statement")
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
|
Loading…
Reference in New Issue
Block a user