Skip to content

Commit

Permalink
keep a field publisher consumes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry committed Aug 19, 2021
1 parent 0c9a183 commit aeb87dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions biothings/hub/dataindex/snapshooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,16 @@ def format(self, doc=None):
"""
template = TemplateStr(json.dumps(self.data))
string = RenderedStr(template_out(template.data, doc or {}))

if "%" in string:
logging.error(template)
logging.error(string)
raise ValueError("Failed to template.")

if template != string:
logging.debug(template)
logging.debug(string)

return RepositoryConfig(json.loads(string.data))


Expand Down Expand Up @@ -230,6 +233,7 @@ def pre_snapshot(self, cfg, index, snapshot):
logging.info(repo)

return {
"conf": {"repository": cfg.data},
"indexer_env": self.idxenv,
"environment": self.name
}
Expand Down

0 comments on commit aeb87dd

Please sign in to comment.