Repository navigation
fix(cli): consistent flags, positional job ids, and fail fast on unreachable databases - #63
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Closes #61
What changed
Old spellings keep working as aliases.
queuecommands use-u/--database-url;-dstays as a hidden short alias.-n/--queueeverywhere.-Qstays as a short alias (job purge,spawn *,archive *),archive --queue-namestays as a long alias, andspawn listgains-n.job retry <JOB_ID>andjob cancel <JOB_ID>work positionally.--job-idstill works; passing both is a usage error.job retrysays it retries failed, dead and timed-out jobs (checked againstRETRYABLE_STATUSES).batch enqueue --queueis described as required, and as the queue for lines without their own.--batch-sizeonly controls progress output, so its help says so, and--progress-everyis an alias.batch retry --max-attempts-reachedis described as a flag.archive run:--no-compressworks and--compress falseis still accepted. Combining--compresswith--no-compressis an error.DatabasePool::connectnow gives up after 10s with a clear error.connect_timeout_secsinconfig.toml,config set connect_timeout_secs N(1-600), orHAMMERWORK_CONNECT_TIMEOUT. Commands use the newDatabasePool::connect_with_config.docs/archiving.mdanddocs/batch-operations.mduse the canonical spellings, and the changelog is updated.Tests
main.rscover every new alias, the positional and--job-idforms, the conflict cases, the old spellings, the help text, and--no-compress.utils::databasetests check thatpostgres://u:p@127.0.0.1:1/x(and the MySQL equivalent) errors within 5s, and that an unroutable address (10.255.255.1) honours a 1s timeout, both directly and through the config.cargo test -p cargo-hammerwork --all-features -- --include-ignoredpasses against local Postgres and MySQL. Clippy with-D warningsandcargo fmtare clean.check_cli_docs.pyovercargo-hammerwork/README.md,README.mdanddocs/*.md: 175 checked, 0 rejected. It now finishes in about 1.5s because a dead port fails immediately.🤖 Generated with Claude Code