ShaoHe Feng has posted comments on this change.
Change subject: Add callback to the plethora of retry halting possibilities ......................................................................
Patch Set 2: (2 inline comments)
.................................................... File tests/miscTests.py Line 675: Line 676: Line 677: class RetryTests(TestCaseBase): Line 678: def testStopCallback(self): Line 679: counter = [0] why using list, not int "counter = 0"? Line 680: limit = 4 Line 681: Line 682: def stopCallback(): Line 683: counter[0] += 1
.................................................... File vdsm/storage/misc.py Line 745: :param sleep: Time to sleep between calls in seconds. Line 746: :param stopCallback: A function that takes no parameters and invokes a Line 747: bail-out when it returns with a positive value. Line 748: """ Line 749: if tries in [0, None]: how about? if not tries: tries = -1 Line 750: tries = -1 Line 751: Line 752: if timeout in [0, None]: Line 753: timeout = -1
-- To view, visit http://gerrit.ovirt.org/8093 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Idb5a2158f008b41133352dcfb4926ad21dcceea1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com