EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 255278c3 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Fixing registrar CLI

parent 72b44ea0
No related branches found
No related tags found
1 merge request!15Registration routes
Pipeline #26210 passed
......@@ -61,7 +61,7 @@ def setup_logging(debug=False):
@click.group()
@click.option("--config-file", type=click.File("r"))
@click.option("--config-file", type=click.Path(exists=True))
@click.option("--validate", is_flag=True)
@click.option("--host", type=str)
@click.option("--port", type=int)
......@@ -77,7 +77,11 @@ def cli(
# ensure that ctx.obj exists and is a dict (in case `cli()` is called
# by means other than the `if` block below)
config = RegistrarConfig.from_file(config_file, validate)
if not config_file:
raise ValueError("Missing --config-file parameter")
with open(config_file, encoding="utf-8") as config_file_:
config = RegistrarConfig.from_file(config_file_, validate)
if host:
config.redis_host = host
if port:
......
......@@ -11,13 +11,10 @@ if test "$DEBUG" = true; then
debug="--debug"
fi
registrar daemon \
${debug} \
registrar \
--config-file /config.yaml \
--host ${REDIS_HOST} \
--port ${REDIS_PORT} \
--register-queue ${REDIS_REGISTER_QUEUE_KEY} \
--register-path-queue ${REDIS_REGISTER_PATH_QUEUE_KEY} \
--deregister-queue ${REDIS_DEREGISTER_QUEUE_KEY} \
--deregister-path-queue ${REDIS_DEREGISTER_PATH_QUEUE_KEY} \
${debug} \
daemon \
${replace} >&2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment