Commit 259d9bfd authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Add create_topic method to AbstractExtension.

parent bd4d4cb5
......@@ -106,9 +106,10 @@ class AbstractExtension(object):
return vispa.workspace.clear_instance(classname, key, user,
workspace, db)
def send_socket(self, view_id, topic, *args, **kwargs):
topic = "extension.%s.socket.%s" % (view_id, topic)
vispa.bus.send_topic(topic, *args, **kwargs)
def create_topic(self, topic="", view_id=None):
if view_id is None:
view_id = cherrypy.request.private_params["_viewId"]
return "extension.%s.socket.%s" % (view_id, topic)
class Server(object):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment