Browse Source

En cours de développement

master
mls-361 8 months ago
parent
commit
058d1de509
  1. 15
      cmd/main.go
  2. 6
      go.mod
  3. 12
      go.sum

15
cmd/main.go

@ -10,7 +10,6 @@ import (
"time"
"forge.chapril.org/armen/armen-jw/factory"
"forge.chapril.org/armen/armen-jw/jw"
"forge.chapril.org/armen/armen-jw/model"
"forge.chapril.org/armen/armen-namespace/runner"
"forge.chapril.org/armen/armen-sdk/logger"
@ -27,19 +26,19 @@ func main() {
logger := logger.Default
logger.Trace("armen", sdk.Fields{"version": _version, "builtAt": _builtAt})
model := model.New(&model.Config{})
factory := factory.New(model)
m := model.New(&model.Config{})
factory := factory.New(m)
nsRunner := runner.New("namespace", model)
nsRunner := runner.New("namespace", m)
_ = nsRunner.AddJobHandler("type", runner.JHF(func(job *runner.Job) *jw.Result {
_ = nsRunner.AddJobHandler("type", runner.JHF(func(job *runner.Job) *model.JobR {
//panic("just a test")
return jw.Pending().SetDuration(1 * time.Second)
return model.JobPending().SetDuration(1 * time.Second)
}))
pool, err := pool.New(&pool.Config{
Size: 3,
Model: model,
Model: m,
})
if err != nil {
logger.Fatal(err.Error(), nil)
@ -52,7 +51,7 @@ func main() {
time.Sleep(1 * time.Second)
_, _ = factory.NewCoreJob("namespace", "type").
_, _ = factory.NewJob("namespace", "type").
SetName("name").
SetOrigin("origin").
SetPriorityLow().

6
go.mod

@ -3,8 +3,8 @@ module forge.chapril.org/armen/armen
go 1.15
require (
forge.chapril.org/armen/armen-jw v0.0.0-20210407210407-2914859935d7
forge.chapril.org/armen/armen-namespace v0.0.0-20210407210454-78acb92ff264
forge.chapril.org/armen/armen-jw v0.0.0-20210408171220-1e0dfdc24098
forge.chapril.org/armen/armen-namespace v0.0.0-20210408171324-438f8084013f
forge.chapril.org/armen/armen-sdk v0.0.0-20210407161823-5d9b3ede386d
forge.chapril.org/armen/armen-workers v0.0.0-20210407210536-28379db67a07
forge.chapril.org/armen/armen-workers v0.0.0-20210408171843-cd3de4bf6907
)

12
go.sum

@ -1,8 +1,8 @@
forge.chapril.org/armen/armen-jw v0.0.0-20210407210407-2914859935d7 h1:SRo/qutfijIQ+L9y5hniKl/pPgEbtkXdTC+wjJv2sws=
forge.chapril.org/armen/armen-jw v0.0.0-20210407210407-2914859935d7/go.mod h1:Ua6ar7aM9haldFljzv0hioR6wZLmmADLJmpmwtIRdQM=
forge.chapril.org/armen/armen-namespace v0.0.0-20210407210454-78acb92ff264 h1:jF/v4tl5eJSlIgCfnO+Wmcatv47R+DQeT29umjCMMNU=
forge.chapril.org/armen/armen-namespace v0.0.0-20210407210454-78acb92ff264/go.mod h1:W0ArWscXEYtnl/SymGxiGEEQwqX41Fd9011Ppsinlvw=
forge.chapril.org/armen/armen-jw v0.0.0-20210408171220-1e0dfdc24098 h1:b9STiUSGLPUbUHNCBrElVJK+eGM0ZKlGjToTGCfd2Pw=
forge.chapril.org/armen/armen-jw v0.0.0-20210408171220-1e0dfdc24098/go.mod h1:Ua6ar7aM9haldFljzv0hioR6wZLmmADLJmpmwtIRdQM=
forge.chapril.org/armen/armen-namespace v0.0.0-20210408171324-438f8084013f h1:EJdwF0H9NX4fc6e2kURKhUKb8U4bvSZ0dQlBgpeSRDo=
forge.chapril.org/armen/armen-namespace v0.0.0-20210408171324-438f8084013f/go.mod h1:+uGATGUmDCg65B+YdVAmp2mWxhplg2wumkpiVrpz4s0=
forge.chapril.org/armen/armen-sdk v0.0.0-20210407161823-5d9b3ede386d h1:MGmU50wLLCokIRAf4b7Pu8qTlbfDTzhNUIlOgSpyh0w=
forge.chapril.org/armen/armen-sdk v0.0.0-20210407161823-5d9b3ede386d/go.mod h1:we9oWhLZ2hPtsyRDbc6cNih/R+gOpsmK4xJopD2VBOM=
forge.chapril.org/armen/armen-workers v0.0.0-20210407210536-28379db67a07 h1:NRnyvEydJPPB5016qruTds1kYeFreIp/cM9/bYwOkik=
forge.chapril.org/armen/armen-workers v0.0.0-20210407210536-28379db67a07/go.mod h1:7H8OasfxZ+6j+o4MC60yc4Ca++QNtsl7dLYeR3IEJns=
forge.chapril.org/armen/armen-workers v0.0.0-20210408171843-cd3de4bf6907 h1:9v//RGOWnDuXWWn2I/KTEYm+4Z/SyFreySKUtMCFVnM=
forge.chapril.org/armen/armen-workers v0.0.0-20210408171843-cd3de4bf6907/go.mod h1:WQoYVJIhfB7UxIRzmvgobInLje28CEky6pkqEQO0G1E=

Loading…
Cancel
Save