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
Allow to specify number of workers in verdi daemon start
#3001
Allow to specify number of workers in verdi daemon start
#3001
Conversation
63cf3a6
to
640674f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks all good, just one question
640674f
to
5a6a373
Compare
@verdi.group('daemon') | ||
def verdi_daemon(): | ||
"""Inspect and manage the daemon.""" | ||
|
||
|
||
@verdi_daemon.command() | ||
@click.option('--foreground', is_flag=True, help='Run in foreground.') | ||
@click.argument('number', default=1, type=int, callback=validate_positive_non_zero_integer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be an option instead?
The command currently is verdi start-circus 12
and I think verdi start-circus --nworkers 12
(or similar) would be more self-explanatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One never calls verdi daemon start-circus
it is a hidden command. But it would be verdi daemon start [NUMBER]
. I chose the argument because that is inline with the already existing commands verdi daemon incr/decr [NUMBER]
.
Thanks, that looks already much better! Sorry to keep nagging here - just two more questions:
|
There isn't a configuration setting yet, as this functionality is new, so yes, for now one would always have to specify an explicit number if one wants more than the default one. I don't think it is a problem, but adding a new issue with a feature request to make this configurable would be a good idea.
It sure is not necessary, it would certainly be possible to implement it differently. I think Rico implemented the very first command this way when migrating to |
Ok, then I would kindly request to
Will approve then - am offline for 2h now |
Done, see #3007
I just realized why keeping the |
Now you can start more than just one worker when starting the daemon.
5a6a373
to
becb8b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot @sphuber !
Fixes #2998
Now you can start more than just one worker when starting the daemon.