Make sure nodes send the right notification when started, stopped or suspended.

This commit is contained in:
grossmj
2016-05-13 20:41:58 -06:00
parent 51738e19c3
commit 5b604da33a
6 changed files with 20 additions and 8 deletions

View File

@ -105,7 +105,9 @@ class BaseNode:
def status(self, status):
self._node_status = status
self._project.emit("node.updated", self)
if status in ("started", "stopped", "suspended"):
self.project.emit("node.{status}".format(status=status), {"node_id": self.id})
self.project.emit("node.updated", self) # FIXME: should we send this when we just start/stop/suspend a node?
@property
def command_line(self):