refactor: update worker processes in EvoBGP to accept dependencies for shared store and job registry. Enhance scheduler, ingest, render, and deploy components to utilize a unified context and improve logging for drift detection. Update architecture documentation to reflect changes in process interactions and worker functionalities.
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
"evobgp/internal/scheduler"
|
||||
)
|
||||
|
||||
// microVPS entrypoint: one process — HTTP API (same as evobgp-api) plus in-process stubs for scheduler/ingest/render/deploy.
|
||||
// microVPS entrypoint: one process — HTTP API plus in-process scheduler, ingest, render, deploy workers (shared store + job registry).
|
||||
func main() {
|
||||
cfg := config.Load()
|
||||
opts := httpapi.Options{
|
||||
@@ -42,10 +42,14 @@ func main() {
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer stop()
|
||||
|
||||
go scheduler.Run(ctx)
|
||||
go ingest.Run(ctx)
|
||||
go render.Run(ctx)
|
||||
go deploy.Run(ctx)
|
||||
schedDeps := &scheduler.Deps{Store: srv.Store(), Jobs: srv.Jobs()}
|
||||
ingestDeps := &ingest.Deps{Store: srv.Store()}
|
||||
renderDeps := &render.Deps{Store: srv.Store()}
|
||||
deployDeps := &deploy.Deps{Store: srv.Store()}
|
||||
go scheduler.Run(ctx, schedDeps)
|
||||
go ingest.Run(ctx, ingestDeps)
|
||||
go render.Run(ctx, renderDeps)
|
||||
go deploy.Run(ctx, deployDeps)
|
||||
|
||||
startBirdMetricsPoller()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user