Skip to content

feat: dynamic queue management via Web UI with optional auth#56

Open
ferdinandjason wants to merge 1 commit into
gojek:masterfrom
ferdinandjason:dynamic-queue-management
Open

feat: dynamic queue management via Web UI with optional auth#56
ferdinandjason wants to merge 1 commit into
gojek:masterfrom
ferdinandjason:dynamic-queue-management

Conversation

@ferdinandjason

Copy link
Copy Markdown

Summary

  • Manage queues at runtime for faster incident response: pause/resume, purge,
    reset lock count, and edit max_concurrency; GET /queues now reports paused.
  • Optional HTTP Basic Auth is opt-in over the whole UI: password set → every
    route requires creds; unset → fully open. Mutating routes are always registered.

Changes

  • client.go: SetMaxConcurrency, PauseJob, ResumeJob, ResetLockCount,
    PurgeQueue (404 on unknown job) + Paused on Queue.
  • webui/handler.go + webui/auth.go: WithBasicAuth wraps the whole mux.
    NewHandler now returns http.Handler (was *http.ServeMux).
  • cmd/workwebui: -auth-user / -auth-password (WORK_WEBUI_AUTH_*).
  • UI: Queues.js controls always shown (Bootstrap 5 badge bg-* fix).
  • Drive-by: workfakedata/workenqueue use redis.DialURL so the default
    redis:// flag works.

Persistence note

max_concurrency is reset on worker-pool restart; paused and lock_count persist.

Add runtime queue management to the Web UI for faster incident response:
pause/resume, purge, reset lock count, and edit max_concurrency, plus a
`paused` flag on GET /queues. Backed by new Client methods that validate the
job name against the known-jobs set (404 on unknown).

Auth is reworked to be opt-in over the WHOLE UI: when a password is set,
HTTP Basic Auth protects every route (pages, JSON API, and mutating
endpoints); otherwise everything is served openly. The mutating endpoints
are always registered — protection comes from the optional auth wrapper or
the non-standard port the UI typically runs on.

Also fixes workfakedata/workenqueue to use redis.DialURL so the default
redis:// URL flag works.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant