test
This commit is contained in:
parent
6a99ed4e6f
commit
b53b769386
@ -617,7 +617,7 @@ func SQLJobWorker() {
|
|||||||
JobQueue <- j
|
JobQueue <- j
|
||||||
}
|
}
|
||||||
if len(jobs) < SQLJobSliceSize {
|
if len(jobs) < SQLJobSliceSize {
|
||||||
time.Sleep(100 * time.Millisecond)
|
//time.Sleep(100 * time.Millisecond)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
@ -630,7 +630,6 @@ func JobWorker(id int, jobs <-chan Job) {
|
|||||||
//log.Printf("jobWorker[" + strconv.Itoa(id) + "] : Starting.")
|
//log.Printf("jobWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||||
// FIXME : discard timed out jobs
|
// FIXME : discard timed out jobs
|
||||||
for j := range jobs {
|
for j := range jobs {
|
||||||
log.Printf("JobWorker[%d] : Starting job %d (timeout : %s).\n", id, j.ID64, j.Timeout.Format(time.RFC3339))
|
|
||||||
if time.Now().UTC().Before(j.Timeout) {
|
if time.Now().UTC().Before(j.Timeout) {
|
||||||
switch j.JobTypeID64 {
|
switch j.JobTypeID64 {
|
||||||
case cacheObjSubType[`job_rescan_msg`]:
|
case cacheObjSubType[`job_rescan_msg`]:
|
||||||
|
Loading…
Reference in New Issue
Block a user