Do not send project closed event when it's a snapshot restore

Ref #602
This commit is contained in:
Julien Duponchelle committed 2016-08-15 13:30:02 +02:00
1 parent 937ffc7b73
commit 431bd789cb
3 files changed
+11 -4

No files matched your search

+3 -2
View File
@@ -440,12 +440,13 @@ class Project:
os.remove(snapshot.path)
@asyncio.coroutine
def close(self):
def close(self, ignore_notification=False):
for compute in self._project_created_on_compute:
yield from compute.post("/projects/{}/close".format(self._id))
self._cleanPictures()
self._status = "closed"
self.controller.notification.emit("project.closed", self.__json__())
if not ignore_notification:
self.controller.notification.emit("project.closed", self.__json__())
def _cleanPictures(self):
"""