refactor: inject ConnectionManager into Worker

Pass ConnectionManager to Worker constructor to enable WebSocket
broadcasting capabilities. Updated:
- main.go: server initialization
- test_helpers.go: test setup
- commonhandlers.go: handler initialization

This change enables Worker to broadcast job updates to connected clients.
This commit is contained in:
2026-03-05 17:13:26 -05:00
parent 39a87ddabc
commit ab11eade68
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ type Handler struct {
func NewHandler(db *database.Queries, connManager *wsync.ConnectionManager, queueProcessor *wsync.SyncQueueProcessor, cfg *config.Config) *Handler {
ctx, cancel := context.WithCancel(context.Background())
worker := services.NewWorker(3)
worker := services.NewWorker(3, connManager)
queueCtx, queueCancel := context.WithCancel(context.Background())