Skip to content
Snippets Groups Projects
Commit b75215b5 authored by Chaza Abdelwahab's avatar Chaza Abdelwahab Committed by Yoann Schneider
Browse files

suggested changes

parent 5378b596
No related branches found
No related tags found
1 merge request!179Move developer setup in a dedicated method
Pipeline #79302 passed
......@@ -68,6 +68,7 @@ class ElementsWorker(
def __init__(self, description="Arkindex Elements Worker", support_cache=False):
super().__init__(description, support_cache)
# Add mandatory argument to process elements
self.parser.add_argument(
"--elements-list",
......
......@@ -170,7 +170,7 @@ class BaseWorker(object):
self.api_client = ArkindexClient(**options_from_env())
logger.debug(f"Setup Arkindex API client on {self.api_client.document.url}")
# Load process information except in developer mode
# Load process information
assert os.environ.get(
"ARKINDEX_PROCESS_ID"
), "ARKINDEX_PROCESS_ID environment variable is not defined"
......@@ -199,7 +199,7 @@ class BaseWorker(object):
# Load all required secrets
self.secrets = {name: self.load_secret(name) for name in required_secrets}
# Load worker run configuration when available and not in dev mode
# Load worker run configuration when available
if os.environ.get("ARKINDEX_WORKER_RUN_ID"):
worker_run = self.request(
"RetrieveWorkerRun", id=os.environ["ARKINDEX_WORKER_RUN_ID"]
......
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