Nir Soffer has posted comments on this change. Change subject: domainMonitor: Introduce cancellation points ......................................................................
Patch Set 2: (1 comment) http://gerrit.ovirt.org/#/c/28721/2/lib/vdsm/utils.py File lib/vdsm/utils.py: Line 816: @functools.wraps(meth) Line 817: def wrapper(self, *a, **kw): Line 818: if self.__canceled__(): Line 819: raise Canceled() Line 820: return meth(self, *a, **kw) > what's wrong with the traditional "func"? other than that, I'm now sure it "meth" because it is a method and the first argument is self - needed for accessing self.__canceled__(). This should be useful for every complex operation that has many steps, where you want to be able to cancel an operation in the middle. I think we don't support this yet, but using this utility it will be easy to do. Federico suggested that we have this as generic utility. If you think that it is too specific, we can move it to vdsm/storage/misc.py, but we like to kill that file, so this seems to the best place for such utils. Line 821: return wrapper Line 822: Line 823: Line 824: def tobool(s): -- To view, visit http://gerrit.ovirt.org/28721 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0a965758736a0b9fa7ac7c2e105bcbbfb04163b8 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yoav Kleinberger <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
