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
@@ -105,7 +105,7 @@ func main() {
libraryService := services.NewLibraryService(queries)
// Create worker for background tasks
worker := services.NewWorker(3)
worker := services.NewWorker(3, connManager)
services.WorkerInstance = worker
koreaderHandler := handlers.NewKOReaderHandler(queries, connManager, queueProcessor)