Browse Source

En cours de développement

master
mls-361 4 months ago
parent
commit
4de784425c
  1. 14
      cmd/main.go
  2. 8
      go.mod
  3. 16
      go.sum

14
cmd/main.go

@ -28,11 +28,13 @@ func main() {
logger.Trace("armen", sdk.Fields{"version": _version, "builtAt": _builtAt})
model := model.New(&model.Config{})
factory := factory.New(model)
nsRunner := runner.New("namespace", model)
_ = nsRunner.AddJobHandler("type", runner.JHF(func(job *runner.Job) *jw.Result {
return nil
//panic("just a test")
return jw.Pending().SetDuration(1 * time.Second)
}))
pool, err := pool.New(&pool.Config{
@ -50,17 +52,17 @@ func main() {
time.Sleep(1 * time.Second)
factory := factory.New(model)
_, _ = factory.NewCoreJob("namespace", "type").
UUID().
Name("name").
Origin("Origin").
PriorityLow().
SetName("name").
SetOrigin("origin").
SetPriorityLow().
CreateJob()
time.Sleep(1 * time.Second)
pool.Stop()
time.Sleep(1 * time.Second)
}
/*

8
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-20210405210229-7f528bbffcad
forge.chapril.org/armen/armen-namespace v0.0.0-20210405210322-d42f91eac7a9
forge.chapril.org/armen/armen-sdk v0.0.0-20210404201237-d01a88d7ae37
forge.chapril.org/armen/armen-workers v0.0.0-20210405213231-bb207cb7a4b5
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-sdk v0.0.0-20210407161823-5d9b3ede386d
forge.chapril.org/armen/armen-workers v0.0.0-20210407210536-28379db67a07
)

16
go.sum

@ -1,8 +1,8 @@
forge.chapril.org/armen/armen-jw v0.0.0-20210405210229-7f528bbffcad h1:PEZ0pPYMLshjOTdObjohiih7wrjOlSCSOCZR+6mlhho=
forge.chapril.org/armen/armen-jw v0.0.0-20210405210229-7f528bbffcad/go.mod h1:Si2CKSYfciZZWz6+B7jpK5rvXQwTK3so5WDeQYoU2yk=
forge.chapril.org/armen/armen-namespace v0.0.0-20210405210322-d42f91eac7a9 h1:4MyFeAmQF5fpKUT0YFIMLfo5a+gSqPG3ycJ3YpfpQ68=
forge.chapril.org/armen/armen-namespace v0.0.0-20210405210322-d42f91eac7a9/go.mod h1:94d9aHoXb6io5czG11NXl11z3yj0W9IpMzcW2kkY9WM=
forge.chapril.org/armen/armen-sdk v0.0.0-20210404201237-d01a88d7ae37 h1:Rz+f6ei4aZ3rIt5AE0aTgIFAoIbGHDM8jpM2byVA3sc=
forge.chapril.org/armen/armen-sdk v0.0.0-20210404201237-d01a88d7ae37/go.mod h1:we9oWhLZ2hPtsyRDbc6cNih/R+gOpsmK4xJopD2VBOM=
forge.chapril.org/armen/armen-workers v0.0.0-20210405213231-bb207cb7a4b5 h1:a2ExTrXofPOrmsO5MiNDy69G6ciDaDLg5YIvQw/mu5o=
forge.chapril.org/armen/armen-workers v0.0.0-20210405213231-bb207cb7a4b5/go.mod h1:NxUZAk/rCK/SgEYb0UPyJc7QMXs2UAasFDeaz/PmHSY=
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-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=
Loading…
Cancel
Save