Browse Source

En cours de développement

master
losyme 2 months ago
parent
commit
28692a79b0
  1. 2
      go.mod
  2. 4
      go.sum
  3. 10
      internal/model/validate.go

2
go.mod

@ -3,7 +3,7 @@ module forge.chapril.org/dune/dune
go 1.17
require (
forge.chapril.org/dune/jw v0.0.0-20211101201542-2d72a4b65b76
forge.chapril.org/dune/jw v0.0.0-20211106184939-3b001b238eb2
forge.chapril.org/losyme/application v0.0.0-20211029102910-b7db6effc015
forge.chapril.org/losyme/cmdline v0.0.0-20211029192907-e6f74788c44f
forge.chapril.org/losyme/config v0.0.0-20211025142334-51a8a7a73a4f

4
go.sum

@ -1,5 +1,5 @@
forge.chapril.org/dune/jw v0.0.0-20211101201542-2d72a4b65b76 h1:37R9pe/qe+zG8/B2puUAjeHQWvJVjXNcAH8h7WUnh28=
forge.chapril.org/dune/jw v0.0.0-20211101201542-2d72a4b65b76/go.mod h1:7CyK2ZvzHntSlOZ7kWcqVhkmUzlE0QI3uKW9kPbNbOY=
forge.chapril.org/dune/jw v0.0.0-20211106184939-3b001b238eb2 h1:cz6IwVTioi4+DsWTYM2T0/RBFPFLggpWmF0HLl0ooxs=
forge.chapril.org/dune/jw v0.0.0-20211106184939-3b001b238eb2/go.mod h1:7CyK2ZvzHntSlOZ7kWcqVhkmUzlE0QI3uKW9kPbNbOY=
forge.chapril.org/losyme/application v0.0.0-20211029102910-b7db6effc015 h1:mZQ2kC2ucXI0lNRVyIOVEz3zu0ChOQ9wTPG0W69fI1Y=
forge.chapril.org/losyme/application v0.0.0-20211029102910-b7db6effc015/go.mod h1:olQo5n5tnBRHq0wcc0lNbymvsXdTuYaCjNfd2d/+01w=
forge.chapril.org/losyme/buffer v0.0.0-20211003203540-771701f5a518 h1:B7wu0DWUwpt0Mw/VTuWQZikhV/VD6kc2iJWbIY+jgEM=

10
internal/model/validate.go

@ -70,8 +70,14 @@ func (m *Model) validateJob(job *jw.Job) error {
job.Private = make(map[string]interface{})
}
if job.MaxAttempts < 0 {
job.MaxAttempts = 0
// AFINIR: Exclusivity
if job.MaxRetries < 0 {
job.MaxRetries = 0
}
if job.MaxOccurences < 0 {
job.MaxOccurences = 0
}
job.Workflow = nil

Loading…
Cancel
Save