Browse Source

En cours de développement

master
losyme 2 months ago
parent
commit
d9ecac362a
  1. 2
      go.mod
  2. 4
      go.sum
  3. 2
      internal/demo/jobs.go
  4. 3
      internal/model/storage.go
  5. 2
      internal/model/workflows.go

2
go.mod

@ -4,7 +4,7 @@ go 1.17
require (
forge.chapril.org/dune/jw v0.0.0-20211124164443-54bdf5007b39
forge.chapril.org/dune/sdk v0.0.0-20211124164826-ed428662ffa0
forge.chapril.org/dune/sdk v0.0.0-20211125142611-8e977b87697a
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-20211124132928-6e36812750b5

4
go.sum

@ -1,7 +1,7 @@
forge.chapril.org/dune/jw v0.0.0-20211124164443-54bdf5007b39 h1:rL9AvrSL89tgld9zy31cusqnuo9ORGmd4rCLroiYiC4=
forge.chapril.org/dune/jw v0.0.0-20211124164443-54bdf5007b39/go.mod h1:7CyK2ZvzHntSlOZ7kWcqVhkmUzlE0QI3uKW9kPbNbOY=
forge.chapril.org/dune/sdk v0.0.0-20211124164826-ed428662ffa0 h1:udCkZaAyYeYPL/FutdyipClExeOmh0yJW4sihrfr9Mk=
forge.chapril.org/dune/sdk v0.0.0-20211124164826-ed428662ffa0/go.mod h1:1xvy88D/oZTmcMesjd6UHp7o3DVSsQWZPVcMSBHkoX8=
forge.chapril.org/dune/sdk v0.0.0-20211125142611-8e977b87697a h1:gwzPTY/XfYrGStkzMbEVtRZY76jvlWHK3D83RMfJeEE=
forge.chapril.org/dune/sdk v0.0.0-20211125142611-8e977b87697a/go.mod h1:1xvy88D/oZTmcMesjd6UHp7o3DVSsQWZPVcMSBHkoX8=
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=

2
internal/demo/jobs.go

@ -57,7 +57,7 @@ func (d *Demo) workflow(job *runner.Job) {
},
}
_, err := job.Factory.NewWorkflow("stepA", allSteps).
_, err := job.Factory.NewWorkflow("firstStep", allSteps).
SetDescription("Demonstration worflow").
SetOrigin("demo").
CreateWorkflow()

3
internal/model/storage.go

@ -8,7 +8,6 @@ package model
import (
"fmt"
"time"
"forge.chapril.org/dune/jw"
)
@ -18,7 +17,7 @@ func (m *Model) logJob(job *jw.Job) {
m.Logger.Info( //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"Job to continue",
"id", job.ID,
"run_after", job.RunAfter.Round(time.Second).String(),
"run_after", job.RunAfter.String(),
"attempt", fmt.Sprintf("%d/%d", job.Attempt, job.MaxAttempts),
)
} else {

2
internal/model/workflows.go

@ -200,7 +200,7 @@ func (m *Model) updateWorkflow(wf *jw.Workflow, job *jw.Job) error {
return err
}
return m.storeWorkflow(nil, job, nextJob)
return m.storeWorkflow(wf, job, nextJob)
}
func (m *Model) SetWorkflowPriority(id string, priority jw.Priority) error {

Loading…
Cancel
Save