Mercurial > kallithea
changeset 7440:f4a9f7a7d030
cli: fix celery-run usage text
Make sure that the help text and error messages from Celery (e.g. from
'kallithea-cli celery-run -c my.ini -- --help' or '-- -xyz') contain a valid
'Usage:' string.
Without these changes, the usage string will use the arbitrary description from
2c3d30095d5e and a full path:
Usage: kallithea celery worker .../bin/kallithea-cli [options]
With the changes, it becomes:
Usage: kallithea-cli celery-run -c CONFIG_FILE -- [options]
Click will let optparse find 'kallithea-cli' from argv[0]. The command part
'celery-run -c CONFIG_FILE --' could perhaps be found with Click introspection,
but it is simpler and perhaps equally reliable to make it explicit.
Original change modified by Mads Kiilerich.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Thu, 22 Nov 2018 22:27:14 +0100 |
parents | 2917d2be0106 |
children | cf1d1239cd55 |
files | kallithea/bin/kallithea_cli_celery.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/bin/kallithea_cli_celery.py Sat Sep 15 21:52:16 2018 +0200 +++ b/kallithea/bin/kallithea_cli_celery.py Thu Nov 22 22:27:14 2018 +0100 @@ -36,4 +36,4 @@ from kallithea.lib import celerypylons cmd = celerypylons.worker.worker(celerypylons.app) - return cmd.run_from_argv('kallithea celery worker', list(celery_args)) + return cmd.run_from_argv(None, command='celery-run -c CONFIG_FILE --', argv=list(celery_args))