EOX GitLab Instance

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

Merge branch 'remove_collection_maps' into 'master'

remove collections maps, remove need to add collection as argument

See merge request !4
parents 9afd95c9 3c11ee5d
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,4 @@
echo "Running seeder"
python3 /seeder.py ${COLLECTION} --mode redis --redis-host ${REDIS_HOST} --redis-port ${REDIS_PORT} --redis-queue-key ${REDIS_QUEUE_KEY}
python3 /seeder.py --mode redis --redis-host ${REDIS_HOST} --redis-port ${REDIS_PORT} --redis-queue-key ${REDIS_QUEUE_KEY}
......@@ -44,12 +44,6 @@ import sqlite3
import boto3
# collection:
COLLECTION_MAP = {
# TODO
}
logger = logging.getLogger(__name__)
......@@ -224,12 +218,6 @@ if __name__ == "__main__":
Pre-seeds cache of PRISM View Server (pvs).
""")
parser.add_argument(
"collection", default=None,
help=(
"Collection the seeder is run for."
)
)
parser.add_argument(
"--mode", default="standard", choices=["standard", "redis"],
help=(
......@@ -278,9 +266,9 @@ if __name__ == "__main__":
setup_logging(arg_values.verbosity)
collection = arg_values.collection
if collection not in COLLECTION_MAP:
logger.critical("Provided collection '%s' is not valid." % collection)
collection = os.environ.get('Collection')
if collection is None:
logger.critical("Collection environment variable not set.")
sys.exit(1)
if arg_values.mode == "standard":
......
......@@ -60,13 +60,6 @@ from eoxserver.resources.coverages.registration.registrators.gdal import (
GDALRegistrator
)
# collection: [name]
COLLECTION_MAP = {
"VHR_IMAGE_2018": ["VHR IMAGE 2018", ],
"Emergency": ["Emergency", ],
}
logger = logging.getLogger(__name__)
......@@ -275,13 +268,6 @@ if __name__ == "__main__":
Register products.
""")
parser.add_argument(
"collection", default=None,
help=(
"Collection the registrar is run for."
)
)
parser.add_argument(
"--mode", default="standard", choices=["standard", "redis"],
help=(
......@@ -326,10 +312,9 @@ if __name__ == "__main__":
setup_logging(arg_values.verbosity)
collection = arg_values.collection
if collection not in COLLECTION_MAP:
logger.critical("Provided collection '%s' is not valid." % collection)
collection = os.environ.get('Collection')
if collection is None:
logger.critical("Collection environment variable not set.")
sys.exit(1)
upload_container = os.environ.get('UPLOAD_CONTAINER')
......
......@@ -2,4 +2,4 @@
echo "Running registrar"
python3 /registrar.py ${COLLECTION} --mode redis --redis-host ${REDIS_HOST} --redis-port ${REDIS_PORT} --redis-register-queue-key ${REDIS_REGISTER_QUEUE_KEY} --redis-registered-set-key ${REDIS_REGISTERED_SET_KEY}
python3 /registrar.py --mode redis --redis-host ${REDIS_HOST} --redis-port ${REDIS_PORT} --redis-register-queue-key ${REDIS_REGISTER_QUEUE_KEY} --redis-registered-set-key ${REDIS_REGISTERED_SET_KEY}
......@@ -41,11 +41,6 @@ import re
from swiftclient.service import SwiftError, SwiftService
# collection: [name]
COLLECTION_MAP = {
"VHR_IMAGE_2018": ["VHR IMAGE 2018", ],
}
logger = logging.getLogger(__name__)
......@@ -146,13 +141,6 @@ if __name__ == "__main__":
Get min/max of products.
""")
parser.add_argument(
"collection", default=None,
help=(
"Collection the registrar is run for."
)
)
parser.add_argument(
"-v", "--verbosity", type=int, default=3, choices=[0, 1, 2, 3, 4],
help=(
......@@ -165,9 +153,9 @@ if __name__ == "__main__":
setup_logging(arg_values.verbosity)
collection = arg_values.collection
if collection not in COLLECTION_MAP:
logger.critical("Provided collection '%s' is not valid." % collection)
collection = os.environ.get('Collection')
if collection is None:
logger.critical("Collection environment variable not set.")
sys.exit(1)
get_min_max(
......
......@@ -46,11 +46,6 @@ from swiftclient.service import SwiftError, SwiftService, SwiftUploadObject
import transform_chain
# collection: [name]
COLLECTION_MAP = {
"VHR_IMAGE_2018": ["VHR IMAGE 2018", ],
"Emergency": ["Emergency", ],
}
SPLIT_PARTS_CHECK = os.environ.get('SPLIT_PARTS_CHECK')
ENFORCE_FOUR_BANDS = os.environ.get('ENFORCE_FOUR_BANDS')
......@@ -341,12 +336,6 @@ if __name__ == "__main__":
Preprocess product data.
""")
parser.add_argument(
"collection", default=None,
help=(
"Collection the preprocessor is run for."
)
)
parser.add_argument(
"--mode", default="standard", choices=["standard", "redis"],
help=(
......@@ -391,9 +380,9 @@ if __name__ == "__main__":
setup_logging(arg_values.verbosity)
collection = arg_values.collection
if collection not in COLLECTION_MAP:
logger.critical("Provided collection '%s' is not valid." % collection)
collection = os.environ.get('Collection')
if collection is None:
logger.critical("Collection environment variable not set.")
sys.exit(1)
upload_container = os.environ.get('UPLOAD_CONTAINER')
......
......@@ -2,4 +2,4 @@
echo "Running preprocessor"
python3 /preprocessor.py ${COLLECTION} --mode redis --redis-host ${REDIS_HOST} --redis-port ${REDIS_PORT} --redis-preprocess-queue-key ${REDIS_PREPROCESS_QUEUE_KEY} --redis-register-queue-key ${REDIS_REGISTER_QUEUE_KEY}
python3 /preprocessor.py --mode redis --redis-host ${REDIS_HOST} --redis-port ${REDIS_PORT} --redis-preprocess-queue-key ${REDIS_PREPROCESS_QUEUE_KEY} --redis-register-queue-key ${REDIS_REGISTER_QUEUE_KEY}
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