Add requires_domain to entry_point. Default is False. Currently only True works.

This commit is contained in:
Daniel Blankenberg
2019-08-20 16:20:48 -04:00
parent 00e575fa1d
commit 41d7155fb6
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -216,7 +216,8 @@ class XmlToolSource(ToolSource):
name = ep_el.get('name', None)
if name:
name = name.strip()
rtt.append(dict(port=port, url=url, name=name))
requires_domain = string_as_bool(ep_el.attrib.get("requires_domain", False))
rtt.append(dict(port=port, url=url, name=name, requires_domain=requires_domain))
return rtt
def parse_hidden(self):
+2
View File
@@ -2452,6 +2452,8 @@ class RealTimeTool(Tool):
def __init__(self, config_file, tool_source, app, **kwd):
assert app.config.interactivetools_enable, ValueError('Trying to load an InteractiveTool, but InteractiveTools are not enabled.')
super(RealTimeTool, self).__init__(config_file, tool_source, app, **kwd)
for port in self.ports:
assert port.get('requires_domain', None), ValueError('InteractiveTools currently only work when requires_domain is True for each entry_point.')
def __remove_realtime_by_job(self, job):
if job: