Skip to content

fix: dashboard listing/stats/cleanup, CLI failed states and default queue, TestQueue parity - #108

Merged
CodingAnarchy merged 2 commits into
masterfrom
fix/issues-103-104-106
Oct 11, 2026
Merged

CodingAnarchy merged 2 commits into
masterfrom
fix/issues-103-104-106

Conversation

@CodingAnarchy

Copy link
Copy Markdown
Owner

Fixes #103
Fixes #104
Fixes #106

#103 dashboard

  • /api/jobs?status= lists any status (Pending incl. scheduled later, Running, Completed, Failed, Dead, TimedOut, Retrying) via new defaulted JobHistory::jobs_with_status (PG and MySQL implemented). Test: test_list_jobs_filters_by_any_status; DB checks in test_job_history_queries_*. Note jobs::routes now needs T: JobHistory like the other routes.
  • Stats time_range=START,END and queues=a,b decode from a query string (JSON forms still work); queues now filters and granularity=hour|day|week is honoured (invalid value is a 400). Tests: test_stats_query_decodes_from_a_query_string, test_stats_routes_accept_query_string_filters, test_roll_up_*. Documented in hammerwork-web/README.md.
  • Maintenance cleanup: the real run now uses delete_jobs(FinishedKind::Dead), the same predicate as the dry-run count. Ignored DB tests test_dead_job_without_failed_at_*.

#104 CLI

  • maintenance vacuum and backup create treat failed as Failed|Dead|TimedOut. Tests: SQL unit tests and extended DB roundtrips.
  • default_queue / HAMMERWORK_DEFAULT_QUEUE is the fallback for job enqueue, batch enqueue, cron create (--queue now optional, clear error otherwise). queue clear|pause|resume still require an explicit queue (deliberate). Test: resolve_queue_*, parse tests.

#106 TestQueue

  • Retry retry_at moved onto the mock clock; get_batch_status/restore_archived_job return JobNotFound, get_queue_stats on an unknown queue returns zero counts, as the PG/MySQL backends do. Tests: retry_outcome_is_moved_onto_the_mock_clock, unknown_ids_and_queues_match_the_database_backends.

CHANGELOG (Unreleased) and READMEs updated. fmt, clippy (workspace + feature matrix), workspace tests and PG/MySQL ignored suites pass locally.

🤖 Generated with Claude Code

CodingAnarchy and others added 2 commits October 11, 2026 08:52
… failed states and default queue (#103 #104 #106)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CodingAnarchy
CodingAnarchy merged commit 3fdf985 into master Oct 11, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant