Browse Source

En cours de développement

master
losyme 1 month ago
parent
commit
4d4b659a0b
  1. 2
      internal/model/jobs.go
  2. 6
      internal/model/next.go

2
internal/model/jobs.go

@ -96,7 +96,7 @@ func (m *model) updateJob(job *jw.Job) error {
func (m *model) UpdateJob(job *jw.Job) (*jw.Job, error) {
if job.Result == nil {
job.Succeeded()
_ = job.Succeeded()
}
jr := job.Result

6
internal/model/next.go

@ -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

Loading…
Cancel
Save