mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 23:06:36 +08:00
refactor(bootstrap): move runtime init from router to cmd layer
Extract SyncEvents and InitLogWriter from router.Serve into bootstrap.Init called from cmd entry points with trace-aware context. Preserve existing Register* wiring for task and push domain integrations.
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"log"
|
||||
"sync"
|
||||
|
||||
"github.com/Rain-kl/Wavelet/internal/bootstrap"
|
||||
"github.com/Rain-kl/Wavelet/internal/router"
|
||||
"github.com/Rain-kl/Wavelet/internal/task/scheduler"
|
||||
"github.com/Rain-kl/Wavelet/internal/task/worker"
|
||||
@@ -20,6 +21,8 @@ var allCmd = &cobra.Command{
|
||||
Short: "以融合模式同时启动 API、Worker 和 Scheduler",
|
||||
Run: func(_ *cobra.Command, _ []string) {
|
||||
log.Println("[All] 融合模式启动")
|
||||
bootstrap.RegisterAll()
|
||||
runBootstrap(bootstrap.Options{API: true})
|
||||
|
||||
var wg sync.WaitGroup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user