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()