Gestionnaire de jobs et workflows
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.3 KiB

/*
------------------------------------------------------------------------------------------------------------------------
####### dune ####### Copyright (c) 2021 losyme ##################################################### MIT License #######
------------------------------------------------------------------------------------------------------------------------
*/
package application
import (
// "forge.chapril.org/dune/sdk/runner"
"forge.chapril.org/dune/sdk/workers"
"forge.chapril.org/losyme/minikit/pkg/components"
)
type demoLogger struct {
*components.Logger
}
func newDemoLogger(logger *components.Logger) *demoLogger {
return &demoLogger{
Logger: logger,
}
}
func (dl *demoLogger) Clone(id, name string) (workers.Logger, error) {
return nil, nil
}
type demo struct {
workers *workers.Workers
}
func (app *Application) setupDemo() error {
// runner := runner.New(app.components.Application.Name(), app.components.Model)
cfg := &workers.Config{
PoolSize: 2,
// Runner: runner,
Logger: newDemoLogger(app.components.Logger),
}
workers, err := workers.New(cfg)
if err != nil {
return err
}
app.demo = &demo{
workers: workers,
}
return nil
}
/*
######################################################################################################## @(°_°)@ #######
*/