Skip to content

Commit

Permalink
add cache handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Feb 20, 2024
1 parent 29180ed commit c443579
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion msc_wis2node/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def identify(self, path: str) -> Union[dict, None]:

return None

def publish_to_wis2(self, dataset: str, url: str) -> None:
def publish_to_wis2(self, dataset: dict, url: str) -> None:
"""
WIS2 publisher
Expand All @@ -175,6 +175,11 @@ def publish_to_wis2(self, dataset: str, url: str) -> None:
url=url
)

cache = dataset.get('cache', True)
if not cache:
LOGGER.info(f'Setting properties.cache={cache}')
message['properties']['cache'] = False

LOGGER.debug('Removing system and version from data_id')
data_id = message['properties']['data_id']
tokens = data_id.split('/')
Expand Down

0 comments on commit c443579

Please sign in to comment.