Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
Init Elements
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Workers
Init Elements
Commits
d0767a3c
Commit
d0767a3c
authored
9 months ago
by
Yoann Schneider
Browse files
Options
Downloads
Plain Diff
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
!6
Use process use_cache
Pipeline
#173838
passed
9 months ago
Stage: test
Stage: build
Stage: release
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.arkindex.yml
+0
-5
0 additions, 5 deletions
.arkindex.yml
tests/conftest.py
+2
-5
2 additions, 5 deletions
tests/conftest.py
worker_init_elements/worker.py
+1
-1
1 addition, 1 deletion
worker_init_elements/worker.py
with
3 additions
and
11 deletions
.arkindex.yml
+
0
−
5
View file @
d0767a3c
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
tests/conftest.py
+
2
−
5
View file @
d0767a3c
...
...
@@ -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
"
,
},
...
...
This diff is collapsed.
Click to expand it.
worker_init_elements/worker.py
+
1
−
1
View file @
d0767a3c
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment