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
bc6b9b9a
Commit
bc6b9b9a
authored
1 year ago
by
Manon Blanco
Committed by
Yoann Schneider
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Use `is_read_only` to allow/forbid to update Worker Activity
parent
5dd605a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!387
Use `is_read_only` to allow/forbid to update Worker Activity
Pipeline
#129779
passed
1 year ago
Stage: release
Changes
1
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex_worker/worker/__init__.py
+1
-5
1 addition, 5 deletions
arkindex_worker/worker/__init__.py
with
1 addition
and
5 deletions
arkindex_worker/worker/__init__.py
+
1
−
5
View file @
bc6b9b9a
...
...
@@ -136,7 +136,7 @@ class ElementsWorker(
Whether or not WorkerActivity support has been enabled on the DataImport
used to run this worker.
"""
if
self
.
args
.
dev
:
if
self
.
is_read_only
:
return
False
assert
(
self
.
process_information
...
...
@@ -278,10 +278,6 @@ class ElementsWorker(
),
"
element_id shouldn
'
t be null and should be an UUID or str
"
assert
isinstance
(
state
,
ActivityState
),
"
state should be an ActivityState
"
if
self
.
is_read_only
:
logger
.
warning
(
"
Cannot update activity as this worker is in read-only mode
"
)
return
True
try
:
self
.
request
(
"
UpdateWorkerActivity
"
,
...
...
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