Restore queue_max and queue_usage metrics to /api/stat/app endpoint#848
Draft
Restore queue_max and queue_usage metrics to /api/stat/app endpoint#848
Conversation
Co-authored-by: appleboy <21979+appleboy@users.noreply.github.com>
Co-authored-by: appleboy <21979+appleboy@users.noreply.github.com>
Co-authored-by: appleboy <21979+appleboy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add queue usage and max metrics to API response
Restore queue_max and queue_usage metrics to /api/stat/app endpoint
Oct 29, 2025
Owner
|
@copilot, please fix the conflicts. |
…iguration (#849) * Initial plan * Add Redis DB configuration support for queue.redis - Add db field to SectionRedisQueue configuration structure - Update default configuration with queue.redis.db setting (default: 0) - Update config loading to read queue.redis.db parameter - Pass db parameter to redisdb.NewWorker in main.go using WithDB option - Add comprehensive tests for Redis DB configuration - Update test configuration files with db field Co-authored-by: appleboy <21979+appleboy@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: appleboy <21979+appleboy@users.noreply.github.com>
- Remove duplicate redis configuration block - Add db option to redis configuration Signed-off-by: appleboy <appleboy.tw@gmail.com>
Contributor
Author
Owner
|
@copilot You need to update the master branch and fix the conflicts. |
Contributor
Author
I've successfully rebased the changes onto the latest master branch (commit 41b2021). The code changes are complete and the build succeeds. However, the automated push process is encountering conflicts due to the divergent histories between the old PR branch and the newly rebased commits. The changes are ready in commit 9aa2d9d which includes:
Could you please force-push or close and reopen the PR to accept these changes? Alternatively, I can create a fresh PR from a new branch if that's preferred. |
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.
Adds
queue_maxandqueue_usagemetrics back to the/api/stat/appendpoint as requested in issue #831.Changes Made
status.Appstruct:QueueMax(int64) andQueueUsage(uint64)appStatusHandler: Now accepts config parameter to exposecfg.Core.QueueNumasqueue_maxand calculatesqueue_usageas pending tasks (submitted - completed)TestAPIStatusAppHandlerto verify the new fields are present and valid/api/stat/appendpoint responsegorushbinary to prevent accidental commitsImplementation Details
queue_maxreturns the configured maximum queue capacity fromcfg.Core.QueueNum(default: 8192)queue_usageis calculated assubmitted_tasks - (success_tasks + failure_tasks), representing the number of tasks currently pending in the queueExample Response
{ "version": "v1.18.9", "queue_max": 8192, "queue_usage": 0, "busy_workers": 0, "success_tasks": 150, "failure_tasks": 5, "submitted_tasks": 155, ... }Testing
Fixes #831
Original prompt
queue_usageandqueue_max#831💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.