WIP: Replace job execution with runner delegation
Server now accepts runner connections via websockets. Jobs will be delegated to these runners. This is currently a WIP, as it is still hardcoded to use the first available runner.
This commit is contained in:
@@ -2,8 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"git.ohea.xyz/cursorius/server/config"
|
||||
"git.ohea.xyz/cursorius/server/jobscheduler"
|
||||
"git.ohea.xyz/cursorius/server/listen"
|
||||
"git.ohea.xyz/cursorius/server/runner"
|
||||
"github.com/op/go-logging"
|
||||
"os"
|
||||
)
|
||||
@@ -29,10 +29,10 @@ func main() {
|
||||
log.Errorf("Could not get configuration: %v", err)
|
||||
}
|
||||
|
||||
ch, err := runner.StartRunner(configData.Config.Jobs)
|
||||
runCh, registerCh, err := jobscheduler.StartJobScheduler(configData.Config.Jobs, configData.Config.Runners)
|
||||
if err != nil {
|
||||
log.Errorf("Could not start runner: %v", err)
|
||||
}
|
||||
|
||||
listen.Listen(configData.Config.Address, configData.Config.Port, ch)
|
||||
listen.Listen(configData.Config.Address, configData.Config.Port, runCh, registerCh)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user