EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit be1754ea authored by Lubomir Dolezal's avatar Lubomir Dolezal
Browse files

disable preprocessor debug by default, make it configurable

parent ad5ada67
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,6 @@
# IN THE SOFTWARE.
#-----------------------------------------------------------------------------
# FROM osgeo/gdal:ubuntu-full-latest
FROM osgeo/gdal:ubuntu-full-3.1.2
MAINTAINER EOX
......@@ -51,22 +50,26 @@ ENV INSTANCE_ID="prism-data-access-server_preprocessor" \
COLLECTION= \
UPLOAD_CONTAINER= \
ST_AUTH_VERSION=3 \
OS_AUTH_URL="https://auth.cloud.ovh.net/v3/" \
OS_AUTH_URL= \
OS_USERNAME= \
OS_PASSWORD= \
OS_TENANT_NAME= \
OS_TENANT_ID= \
OS_REGION_NAME= \
OS_USER_DOMAIN_NAME= \
OS_AUTH_URL_DOWNLOAD= \
ST_AUTH_VERSION_DOWNLOAD= \
OS_USERNAME_DOWNLOAD= \
OS_PASSWORD_DOWNLOAD= \
OS_TENANT_NAME_DOWNLOAD= \
OS_REGION_NAME_DOWNLOAD= \
OS_USER_DOMAIN_NAME_DOWNLOAD= \
REDIS_HOST= \
REDIS_PORT= \
REDIS_PREPROCESS_QUEUE_KEY= \
REDIS_REGISTER_QUEUE_KEY=
REDIS_PREPROCESS_MD_QUEUE_KEY= \
REDIS_REGISTER_QUEUE_KEY= \
PREPROCESSOR_DEBUG=
ADD run-preprocessor.sh \
entrypoint.sh \
......
......@@ -43,7 +43,7 @@ def validate_config(config):
@click.group()
def cli():
setup_logging(True)
pass
@cli.command(help='Run the preprocess daemon, attaching to a Redis queue')
......@@ -55,7 +55,9 @@ def cli():
@click.option('--listen-queue', type=str)
@click.option('--listen-md-queue', type=str)
@click.option('--write-queue', type=str)
def daemon(config_file=None, use_dir=None, validate=False, host=None, port=None, listen_queue=None, listen_md_queue=None, write_queue=None):
@click.option('--debug/--no-debug', default=False)
def daemon(config_file=None, use_dir=None, validate=False, host=None, port=None, listen_queue=None, listen_md_queue=None, write_queue=None, debug=False):
setup_logging(debug)
config = load_config(config_file)
if validate:
validate_config(config)
......@@ -68,7 +70,9 @@ def daemon(config_file=None, use_dir=None, validate=False, host=None, port=None,
@click.option('--use-dir', type=str) # TODO: check dir
@click.option('--validate/--no-validate', default=False)
@click.option('--browse-report/--no-browse-report', default=False)
def preprocess(file_path, config_file=None, use_dir=None, validate=False, browse_report=False):
@click.option('--debug/--no-debug', default=False)
def preprocess(file_path, config_file=None, use_dir=None, validate=False, browse_report=False, debug=False):
setup_logging(debug)
config = load_config(config_file)
if validate:
validate_config(config)
......@@ -83,6 +87,5 @@ def preprocess(file_path, config_file=None, use_dir=None, validate=False, browse
else:
preprocess_file(config, file_path, use_dir)
if __name__ == '__main__':
cli()
#!/bin/sh
echo "Running preprocessor"
debug="--no-debug"
if test "$PREPROCESSOR_DEBUG" = true; then
debug="--debug"
fi
preprocessor daemon \
--config-file /config.yaml \
......@@ -8,4 +12,5 @@ preprocessor daemon \
--port ${REDIS_PORT} \
--listen-queue ${REDIS_PREPROCESS_QUEUE_KEY} \
--listen-md-queue ${REDIS_PREPROCESS_MD_QUEUE_KEY} \
--write-queue ${REDIS_REGISTER_QUEUE_KEY}
--write-queue ${REDIS_REGISTER_QUEUE_KEY} \
${debug}
\ No newline at end of file
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