Browse Source

En cours de développement

master
losyme 7 months ago
parent
commit
2baf47ee20
  1. 13
      workers/config.go
  2. 9
      workers/workers.go

13
workers/config.go

@ -7,19 +7,26 @@
package workers
import (
"forge.chapril.org/dune/jw"
"forge.chapril.org/losyme/errors"
"forge.chapril.org/dune/sdk/runner"
)
const _maxPoolSize = 20
type Logger interface {
runner.Logger
Clone(id, name string) (Logger, error)
Info(msg string, kv ...interface{})
Warning(msg string, kv ...interface{})
Error(msg string, kv ...interface{})
Remove()
}
type Runner interface {
Namespace() string
Model() runner.Model
RunJob(job *jw.Job, logger runner.Logger)
}
type Config struct {
PoolSize int
Host string

9
workers/workers.go

@ -9,18 +9,9 @@ package workers
import (
"sync"
"forge.chapril.org/dune/jw"
"forge.chapril.org/losyme/errors"
"forge.chapril.org/dune/sdk/runner"
)
type Runner interface {
Namespace() string
Model() runner.Model
RunJob(job *jw.Job, logger Logger)
}
type Workers struct {
supervisor *supervisor
dashboard *dashboard

Loading…
Cancel
Save