EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
be1754ea
Commit
be1754ea
authored
4 years ago
by
Lubomir Dolezal
Browse files
Options
Downloads
Patches
Plain Diff
disable preprocessor debug by default, make it configurable
parent
ad5ada67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
preprocessor/Dockerfile
+6
-3
6 additions, 3 deletions
preprocessor/Dockerfile
preprocessor/preprocessor/cli.py
+7
-4
7 additions, 4 deletions
preprocessor/preprocessor/cli.py
preprocessor/run-preprocessor.sh
+6
-1
6 additions, 1 deletion
preprocessor/run-preprocessor.sh
with
19 additions
and
8 deletions
preprocessor/Dockerfile
+
6
−
3
View file @
be1754ea
...
...
@@ -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 \
...
...
This diff is collapsed.
Click to expand it.
preprocessor/preprocessor/cli.py
+
7
−
4
View file @
be1754ea
...
...
@@ -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
()
This diff is collapsed.
Click to expand it.
preprocessor/run-preprocessor.sh
+
6
−
1
View file @
be1754ea
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment