load different env vars for the variable depending on the set

This commit is contained in:
Francisco Schulz 2022-10-13 10:29:57 +02:00
parent 94beb544fa
commit bb5b73e189

View File

@ -38,7 +38,10 @@ class Config(object):
self.storage_backend = read_from_environment("STORAGE_BACKEND", "s3")
# The bucket / container to pull files specified in queue requests from
self.storage_bucket = read_from_environment("STORAGE_BUCKET_NAME", "redaction")
if self.storage_backend == "s3":
self.storage_bucket = read_from_environment("STORAGE_BUCKET_NAME", "redaction")
else:
self.storage_bucket = read_from_environment("STORAGE_AZURECONTAINERNAME", "redaction")
# Endpoint for s3 storage
self.storage_endpoint = read_from_environment("STORAGE_ENDPOINT", "http://127.0.0.1:9000")