Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use plugins to load workers and expose cli options #1044

Open
lorengordon opened this issue Dec 10, 2019 · 1 comment
Open

Use plugins to load workers and expose cli options #1044

lorengordon opened this issue Dec 10, 2019 · 1 comment

Comments

@lorengordon
Copy link
Member

Right now, any cli argument is managed directly in the cli.py module. It passes all unknown arguments directly through to all workers. This was good for rapid iteration on worker functionality, but means that exposing arguments for a given worker requires modifying the cli.py module directly (as well as the worker itself).

Instead, consider an approach that is more modular, where the cli config for a worker is managed entirely in the worker. Where workers are "registered" as plugins with watchmaker, and that registration informs watchmaker how to expose the cli options for that worker. Look to pytest and pytest plugins for an example.

@ferricoxide
Copy link
Member

This issue is pretty old: can it be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants