Browse Source

En cours de développement

master
losyme 7 months ago
parent
commit
18e3417003
  1. 4
      factory/job.go
  2. 2
      go.mod
  3. 4
      go.sum
  4. 2
      workers/worker.go

4
factory/job.go

@ -97,8 +97,8 @@ func (job *Job) SetExclusivityNamespace() *Job {
return job
}
func (job *Job) SetMaxRetries(value int) *Job {
job.job.SetMaxRetries(value)
func (job *Job) SetMaxAttempts(value int) *Job {
job.job.SetMaxAttempts(value)
return job
}

2
go.mod

@ -3,7 +3,7 @@ module forge.chapril.org/dune/sdk
go 1.17
require (
forge.chapril.org/dune/jw v0.0.0-20211114170701-4b66b0d705ea
forge.chapril.org/dune/jw v0.0.0-20211124161619-58a5de54972f
forge.chapril.org/losyme/errors v0.0.0-20211003204336-ad5510c24b40
forge.chapril.org/losyme/uuid v0.0.0-20211007082235-8d502169e034
)

4
go.sum

@ -1,5 +1,5 @@
forge.chapril.org/dune/jw v0.0.0-20211114170701-4b66b0d705ea h1:EC1XXrDQ6E7Oed04iZFKsk2dbxJORBH2G+UxBFz42j4=
forge.chapril.org/dune/jw v0.0.0-20211114170701-4b66b0d705ea/go.mod h1:7CyK2ZvzHntSlOZ7kWcqVhkmUzlE0QI3uKW9kPbNbOY=
forge.chapril.org/dune/jw v0.0.0-20211124161619-58a5de54972f h1:32SUe5CprdQLjILlUpehLn1+z/pRjoJ8hCAaIem1ePQ=
forge.chapril.org/dune/jw v0.0.0-20211124161619-58a5de54972f/go.mod h1:7CyK2ZvzHntSlOZ7kWcqVhkmUzlE0QI3uKW9kPbNbOY=
forge.chapril.org/losyme/buffer v0.0.0-20211003203540-771701f5a518 h1:B7wu0DWUwpt0Mw/VTuWQZikhV/VD6kc2iJWbIY+jgEM=
forge.chapril.org/losyme/buffer v0.0.0-20211003203540-771701f5a518/go.mod h1:4Yl585hmF3bWZfuwGF2Ym8ErykJZiF9yawlmK7szIkc=
forge.chapril.org/losyme/errors v0.0.0-20211003204336-ad5510c24b40 h1:EoVVFHoIsWRlecHmXP4kx3ALchz5DAfNwso3gcl/Jbk=

2
workers/worker.go

@ -76,7 +76,7 @@ func (w *worker) updateJob(job *jw.Job, logger Logger) {
"END",
"status", job.Status,
"run_after", job.RunAfter.Round(time.Second).String(),
"attempt", fmt.Sprintf("%d/%d", job.Attempt, job.MaxRetries),
"attempt", fmt.Sprintf("%d/%d", job.Attempt, job.MaxAttempts),
)
} else {
logger.Info("END", "status", job.Status) //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Loading…
Cancel
Save