Change in vdsm[master]: virt: migration: use contextmanager for monitor

asegurap at redhat.com asegurap at redhat.com
Fri Mar 21 11:54:41 UTC 2014


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 at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list