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:
2022-10-16 14:54:49 -06:00
parent b44d4352ff
commit bbe9dcaf2a
7 changed files with 255 additions and 213 deletions
+3 -3
View File
@@ -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)
}