Nir Soffer has posted comments on this change.
Change subject: jobs: Add when_finished callback and wire up Job.abort
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/61254/1/lib/vdsm/jobs.py
File lib/vdsm/jobs.py:
Line 70: self._id = job_id
Line 71: self._status = STATUS.PENDING
Line 72: self._description = description
Line 73: self._error = None
Line 74: self._finished_cb = lambda: None
I don't see a need for generic finished callback. Since we are adding autoclear only
to sdm jobs now, we should just schedule a jobs.delete(job_id) in sdm.base.Job.run.
We should create the most simple and direct code that does what we need now.
Line 75:
Line 76: @property
Line 77: def id(self):
Line 78: return self._id
--
To view, visit
https://gerrit.ovirt.org/61254
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I73d4c167a4cf1f1da4c1e2629b7afa9c01d338fd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes