mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Option for auto close project when no client listen
And fix websocket not correctly detected has closed. Ref https://github.com/GNS3/gns3-gui/issues/1331
This commit is contained in:
4 files changed
+26
No files matched your search
@@ -44,6 +44,13 @@ class Notification:
|
||||
yield queue
|
||||
self._listeners[project.id].remove(queue)
|
||||
|
||||
def project_has_listeners(self, project):
|
||||
"""
|
||||
:param project_id: Project object
|
||||
:returns: True if client listen this project
|
||||
"""
|
||||
return project.id in self._listeners and len(self._listeners[project.id]) > 0
|
||||
|
||||
def dispatch(self, action, event, compute_id):
|
||||
"""
|
||||
Notification received from compute node. Send it directly
|
||||
|
||||
Reference in new issue
Block a user