Skip to content
Snippets Groups Projects
Commit b6973ff4 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Merge branch 'process-chunks' into 'master'

Use process_information[chunks] instead of a CLI param

Closes #9

See merge request !9
parents 1abb7344 b4fac4fd
No related branches found
No related tags found
1 merge request!9Use process_information[chunks] instead of a CLI param
Pipeline #175267 passed
......@@ -79,6 +79,7 @@ def _mock_worker_run_api(mock_api_client: MockApiClient) -> None:
"process": {
"id": "process_id",
"mode": "workers",
"chunks": 1,
"corpus": os.getenv("ARKINDEX_CORPUS_ID"),
"activity_state": "disabled",
"use_cache": False,
......
......@@ -61,14 +61,6 @@ class ActivityState(Enum):
class InitElementsWorker(BaseWorker):
def add_arguments(self) -> None:
self.parser.add_argument(
"--chunks-number",
help="Number of chunks to split workflow into after initialisation",
type=int,
default=1,
)
def configure(self) -> None:
# CLI args are stored on the instance so that implementations can access them
self.args = self.parser.parse_args()
......@@ -83,7 +75,7 @@ class InitElementsWorker(BaseWorker):
self.config.update(self.user_configuration)
logger.info("User configuration retrieved")
self.chunks_number = self.args.chunks_number
self.chunks_number = self.process_information["chunks"]
self.use_cache = self.process_information["use_cache"]
self.api_client.sleep_duration = self.config["sleep"]
......
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