Dan Kenigsberg has posted comments on this change.
Change subject: schedule: Introduce scheduling library ......................................................................
Patch Set 23: Code-Review-1
(2 comments)
only minor nit found - please implement with monotonic timeout.
http://gerrit.ovirt.org/#/c/29607/23/lib/vdsm/schedule.py File lib/vdsm/schedule.py:
Line 109: Line 110: Returns a ScheduledCall that may be canceled if callable was not called Line 111: yet. Line 112: """ Line 113: deadline = time.time() + delay now we can use monotonic_time(), just in case someone plays with the system date. Line 114: call = ScheduledCall(callable) Line 115: with self._cond: Line 116: if not self._running: Line 117: raise AssertionError("Scheduler not running")
Line 123: Line 124: @utils.traceback(on=_log.name) Line 125: def _run(self): Line 126: try: Line 127: self._log.debug("started") strictly speaking, first log should be out of the try block Line 128: self._loop() Line 129: self._log.debug("stopped") Line 130: finally: Line 131: self._cancel_calls()