feat: dynamic queue management via Web UI with optional auth#56
Open
ferdinandjason wants to merge 1 commit into
Open
feat: dynamic queue management via Web UI with optional auth#56ferdinandjason wants to merge 1 commit into
ferdinandjason wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reset lock count, and edit
max_concurrency;GET /queuesnow reportspaused.route requires creds; unset → fully open. Mutating routes are always registered.
Changes
client.go:SetMaxConcurrency,PauseJob,ResumeJob,ResetLockCount,PurgeQueue(404 on unknown job) +PausedonQueue.webui/handler.go+webui/auth.go:WithBasicAuthwraps the whole mux.NewHandlernow returnshttp.Handler(was*http.ServeMux).cmd/workwebui:-auth-user/-auth-password(WORK_WEBUI_AUTH_*).Queues.jscontrols always shown (Bootstrap 5badge bg-*fix).workfakedata/workenqueueuseredis.DialURLso the defaultredis://flag works.Persistence note
max_concurrencyis reset on worker-pool restart;pausedandlock_countpersist.