Skip to content

Commit

Permalink
now adding generator after base_worker init
Browse files Browse the repository at this point in the history
  • Loading branch information
jblom committed Nov 7, 2023
1 parent f42ca78 commit 2d7189e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ def __init__(self, config):
"#.VISXP_EXTRACT" # ['Video.VISXP_PREP', 'Sound.VISXP_PREP']
)
self.__depends_on = self.DANE_DEPENDENCIES # TODO make this part of DANE lib?
# NOTE: cannot be automaticcally filled, because no git client is present
self.generator = {
"id": "dane-visual-feature-extraction-worker",
"type": "Software",
"name": "VISXP_EXTRACT",
"homepage": "https://github.com/beeldengeluid/dane-visual-feature-extraction-worker",
}

if not self.UNIT_TESTING:
logger.warning("Need to initialize the VISXP_EXTRACT service")
Expand All @@ -138,6 +131,16 @@ def __init__(self, config):
no_api=self.UNIT_TESTING,
)

# NOTE: cannot be automaticcally filled, because no git client is present
if not self.generator:
logger.info("Generator was None, creating it now")
self.generator = {
"id": "dane-visual-feature-extraction-worker",
"type": "Software",
"name": "VISXP_EXTRACT",
"homepage": "https://github.com/beeldengeluid/dane-visual-feature-extraction-worker",
}

"""----------------------------------INIT VALIDATION FUNCTIONS ---------------------------------"""

def validate_data_dirs(
Expand Down

0 comments on commit 2d7189e

Please sign in to comment.