Skip to content
Snippets Groups Projects

Move developer setup in a dedicated method

Merged Thibault Lavigne requested to merge 117-move-developer-setup-in-a-dedicated-method-2 into master
3 files
+ 99
89
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -67,7 +67,9 @@ class ElementsWorker(
"""
def __init__(self, description="Arkindex Elements Worker", support_cache=False):
print("in __init__ in __init__.py before super")
super().__init__(description, support_cache)
print("in __init__ in __init__.py after super")
# Add mandatory argument to process elements
self.parser.add_argument(
@@ -87,6 +89,9 @@ class ElementsWorker(
self._worker_version_cache = {}
# CLI args are stored on the instance so that implementations can access them
self.args = self.parser.parse_args()
def list_elements(self):
"""
List the elements to be processed, either from the CLI arguments or
@@ -136,8 +141,11 @@ class ElementsWorker(
return self.process_information.get("activity_state") == "ready"
def configure(self):
super().configure()
super().configure_cache()
if self.is_read_only:
super().configure_for_developers()
else:
super().configure()
super().configure_cache()
# Add report concerning elements
self.report = Reporter(
Loading