Skip to content
Snippets Groups Projects
Commit bc6b9b9a authored by Manon Blanco's avatar Manon Blanco Committed by Yoann Schneider
Browse files

Use `is_read_only` to allow/forbid to update Worker Activity

parent 5dd605a6
No related branches found
No related tags found
1 merge request!387Use `is_read_only` to allow/forbid to update Worker Activity
Pipeline #129779 passed
......@@ -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",
......
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