feat: add pagination and task management APIs for external UI support#59
Merged
feat: add pagination and task management APIs for external UI support#59
Conversation
This change adds pagination support for pending jobs and persistent task metadata storage to enable external UI/dashboard integrations. Key additions: - Broker pagination: GetPendingWithPagination() and GetPendingCount() methods for efficient querying of large job queues (Redis & in-memory implementations) - Task metadata persistence: Results interface now stores registered task info (name, queue, concurrency) for discovery across server restarts - Server.GetTasks() refactored to pull from persistent store instead of in-memory map, enabling UI to discover available tasks - NATS broker returns "not supported" for pagination (consistent with existing behavior) Implementation details: - Redis uses LRANGE/LLEN for pagination, MGET for batch task retrieval - In-memory broker uses slice-based pagination with proper bounds checking - All implementations validate offset/limit (max 10k items per page) - Task registration now persists TaskInfo to results backend via msgpack - GetPending() deprecated in favor of paginated version Breaking changes: None (additive only) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
cda81d6 to
a1fb11b
Compare
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.
This change adds pagination support for pending jobs and persistent task metadata storage to enable external UI/dashboard integrations.
Key additions:
Implementation details:
Breaking changes: None (additive only)