Antoni Segura Puimedon has posted comments on this change.
Change subject: virt: migration: use contextmanager for monitor
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
small recommendation to simplify.
http://gerrit.ovirt.org/#/c/25978/3/vdsm/migration.py
File vdsm/migration.py:
Line 256: self._recover(str(e))
Line 257: self.log.error("Failed to migrate", exc_info=True)
Line 258:
Line 259: @contextmanager
Line 260: def migrationMonitor(self, startTime):
We could move this outside of the class (receiving the parameters it needs for creating a
MigrationMonitorThread, which would be an object local to the context manager.
Line 261: self._monitorThread = MigrationMonitorThread(self._vm,
Line 262: startTime,
Line 263: int(self._downtime))
Line 264: self._monitorThread.start()
--
To view, visit
http://gerrit.ovirt.org/25978
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie7fcd0bedf4f30cc0bcab03339322df1fc5434e8
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes