refactor(phase7): Initialize JobRunner in factory.go
- Create jobRunner using NewJobRunner with local and container executors - Assign jobRunner to Worker.runner field - JobRunner available for future task execution orchestration Build status: Compiles successfully
This commit is contained in:
parent
51698d60de
commit
085c23f66a
1 changed files with 9 additions and 0 deletions
|
|
@ -126,6 +126,14 @@ func NewWorker(cfg *Config, _ string) (*Worker, error) {
|
|||
cfg.LocalMode,
|
||||
)
|
||||
|
||||
// Create job runner
|
||||
jobRunner := executor.NewJobRunner(
|
||||
localExecutor,
|
||||
containerExecutor,
|
||||
nil, // ManifestWriter - can be added later if needed
|
||||
logger,
|
||||
)
|
||||
|
||||
runLoop := lifecycle.NewRunLoop(
|
||||
runLoopConfig,
|
||||
queueClient,
|
||||
|
|
@ -150,6 +158,7 @@ func NewWorker(cfg *Config, _ string) (*Worker, error) {
|
|||
config: cfg,
|
||||
logger: logger,
|
||||
runLoop: runLoop,
|
||||
runner: jobRunner,
|
||||
metrics: metricsObj,
|
||||
health: lifecycle.NewHealthMonitor(),
|
||||
resources: rm,
|
||||
|
|
|
|||
Loading…
Reference in a new issue