Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Workers
Base Worker
Commits
b75215b5
Commit
b75215b5
authored
2 years ago
by
Chaza Abdelwahab
Committed by
Yoann Schneider
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
suggested changes
parent
5378b596
No related branches found
No related tags found
1 merge request
!179
Move developer setup in a dedicated method
Pipeline
#79302
passed
2 years ago
Stage: test
Stage: build
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arkindex_worker/worker/__init__.py
+1
-0
1 addition, 0 deletions
arkindex_worker/worker/__init__.py
arkindex_worker/worker/base.py
+2
-2
2 additions, 2 deletions
arkindex_worker/worker/base.py
with
3 additions
and
2 deletions
arkindex_worker/worker/__init__.py
+
1
−
0
View file @
b75215b5
...
...
@@ -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
"
,
...
...
This diff is collapsed.
Click to expand it.
arkindex_worker/worker/base.py
+
2
−
2
View file @
b75215b5
...
...
@@ -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
"
]
...
...
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