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
b6973ff4
Commit
b6973ff4
authored
9 months ago
by
Yoann Schneider
Browse files
Options
Downloads
Plain Diff
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
!9
Use process_information[chunks] instead of a CLI param
Pipeline
#175267
passed
9 months ago
Stage: release
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/conftest.py
+1
-0
1 addition, 0 deletions
tests/conftest.py
worker_init_elements/worker.py
+1
-9
1 addition, 9 deletions
worker_init_elements/worker.py
with
2 additions
and
9 deletions
tests/conftest.py
+
1
−
0
View file @
b6973ff4
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
worker_init_elements/worker.py
+
1
−
9
View file @
b6973ff4
...
...
@@ -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
"
]
...
...
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