|
|
|
@ -22,7 +22,7 @@ func selectNextJob(jr storage.JobsRunning, jtr storage.JobsToRun) (*jw.Job, erro
|
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if jr != nil && len(jr) > 0 { |
|
|
|
|
if len(jr) > 0 { |
|
|
|
|
if job.Exclusive { |
|
|
|
|
return nil, nil |
|
|
|
|
} |
|
|
|
@ -53,9 +53,9 @@ func (m *model) NextJob(namespace string) (*jw.Job, error) {
|
|
|
|
|
return nil, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
job.Session += 1 |
|
|
|
|
job.Session++ |
|
|
|
|
job.Result = nil |
|
|
|
|
job.Weight += 1 |
|
|
|
|
job.Weight++ |
|
|
|
|
|
|
|
|
|
if job.Weight >= _maxWeight { |
|
|
|
|
job.Weight = 0 |
|
|
|
|