Skip to content

spider_scheduler and spider_worker don't print CLI usage info #51

@kirkrodrigues

Description

@kirkrodrigues

Bug

Usually, executing a CLI command without arguments or with the --help flag will print usage instructions. This is not the case for spider_scheduler and spider_worker meaning users have to either read the docs or the code to figure out how to use the tools appropriately.

In addition, any unknown arguments or missing values results in an uncaught exception.

We're already using boost::program_options, so we should improve the code to utilize its ability to handle the --help flag and catch parsing exceptions appropriately.

Spider version

e7f7c48

Environment

Ubuntu 24.04

Reproduction steps

# No args
./spider_scheduler
./spider_worker

# Help flag
./spider_scheduler --help
./spider_worker --help

# Argument without value
./spider_scheduler --port
./spider_worker --port

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions