refactor(phase7): Integrate resource manager into Worker
- Added resources field to Worker struct - Updated factory.go to pass resource manager to Worker - Removed placeholder discard of resource manager - Build compiles successfully
This commit is contained in:
parent
a7360869f8
commit
1ba67e419d
2 changed files with 10 additions and 8 deletions
|
|
@ -144,16 +144,16 @@ func NewWorker(cfg *Config, _ string) (*Worker, error) {
|
|||
cancel()
|
||||
return nil, fmt.Errorf("failed to init resource manager: %w", err)
|
||||
}
|
||||
_ = rm // Resource manager stored for future use
|
||||
|
||||
worker := &Worker{
|
||||
id: cfg.WorkerID,
|
||||
config: cfg,
|
||||
logger: logger,
|
||||
runLoop: runLoop,
|
||||
metrics: metricsObj,
|
||||
health: lifecycle.NewHealthMonitor(),
|
||||
jupyter: jupyterMgr,
|
||||
id: cfg.WorkerID,
|
||||
config: cfg,
|
||||
logger: logger,
|
||||
runLoop: runLoop,
|
||||
metrics: metricsObj,
|
||||
health: lifecycle.NewHealthMonitor(),
|
||||
resources: rm,
|
||||
jupyter: jupyterMgr,
|
||||
}
|
||||
|
||||
// Log GPU configuration
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/jfraeys/fetch_ml/internal/jupyter"
|
||||
"github.com/jfraeys/fetch_ml/internal/logging"
|
||||
"github.com/jfraeys/fetch_ml/internal/metrics"
|
||||
"github.com/jfraeys/fetch_ml/internal/resources"
|
||||
"github.com/jfraeys/fetch_ml/internal/worker/executor"
|
||||
"github.com/jfraeys/fetch_ml/internal/worker/lifecycle"
|
||||
)
|
||||
|
|
@ -50,6 +51,7 @@ type Worker struct {
|
|||
metrics *metrics.Metrics
|
||||
metricsSrv *http.Server
|
||||
health *lifecycle.HealthMonitor
|
||||
resources *resources.Manager
|
||||
|
||||
// Legacy fields for backward compatibility during migration
|
||||
jupyter JupyterManager
|
||||
|
|
|
|||
Loading…
Reference in a new issue