diff --git a/preprocessor/preprocessor.py b/preprocessor/preprocessor.py index 9894bbad077b66162a1648fd62f5818ac664f08f..e24892eb0b93fe92632d9fc00ae3a38339b80a6d 100644 --- a/preprocessor/preprocessor.py +++ b/preprocessor/preprocessor.py @@ -349,6 +349,12 @@ if __name__ == "__main__": "Path to object holding tar archive file of product." ) ) + parser.add_argument( + "--upload-container", default=None, + help=( + "The name of the swift container where the result is uploaded." + ) + ) parser.add_argument( "--replace", action="store_true", help=( @@ -380,15 +386,17 @@ if __name__ == "__main__": setup_logging(arg_values.verbosity) - collection = os.environ.get('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') + upload_container = arg_values.upload_container if upload_container is None: - logger.critical("UPLOAD_CONTAINER environment variable not set.") - sys.exit(1) + upload_container = os.environ.get('UPLOAD_CONTAINER') + if upload_container is None: + logger.critical("UPLOAD_CONTAINER environment variable not set.") + sys.exit(1) if arg_values.mode == "standard": preprocessor(