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

Merge branch 'use-process-cache-param' into 'master'

Use process use_cache

Closes #5

See merge request !6
parents 301a6a01 f4138e43
No related branches found
No related tags found
1 merge request!6Use process use_cache
Pipeline #173838 passed
......@@ -9,11 +9,6 @@ workers:
build: Dockerfile
command: worker-init-elements
user_configuration:
use_cache:
title: Enable SQLite database generation for worker caching
type: bool
default: false
required: false
sleep:
title: Throttle API requests by waiting for a given number of seconds
type: float
......
......@@ -67,11 +67,6 @@ def _mock_worker_run_api(mock_api_client: MockApiClient) -> None:
"description": None,
"configuration": {},
"user_configuration": {
"use_cache": {
"type": "bool",
"title": "Use cache",
"default": False,
},
"threshold_value": {
"type": "float",
"title": "Threshold Value",
......@@ -90,8 +85,10 @@ def _mock_worker_run_api(mock_api_client: MockApiClient) -> None:
"configuration": None,
"process": {
"id": "process_id",
"mode": "workers",
"corpus": os.getenv("ARKINDEX_CORPUS_ID"),
"activity_state": "disabled",
"use_cache": False,
},
"summary": os.getenv("ARKINDEX_WORKER_RUN_ID") + " @ version 1",
},
......
......@@ -84,7 +84,7 @@ class InitElementsWorker(BaseWorker):
logger.info("User configuration retrieved")
self.chunks_number = self.args.chunks_number
self.use_cache = self.config["use_cache"]
self.use_cache = self.process_information["use_cache"]
self.api_client.sleep_duration = self.config["sleep"]
def dump_json(self, elements: list[dict], filename: str = "elements.json") -> None:
......
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