Change in vdsm[master]: lib: executor: report worker status in __repr__

nsoffer at redhat.com nsoffer at redhat.com
Fri Dec 4 16:45:33 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: lib: executor: report worker status in __repr__
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/49722/1/lib/vdsm/executor.py
File lib/vdsm/executor.py:

Line 216:         self._executor._worker_discarded(self)
Line 217: 
Line 218:     def __repr__(self):
Line 219:         return "<Worker %s name=%s task=%s at 0x%x>" % (
Line 220:             "discarded" if self._discarded else "available",
If the worker is running a task, it is not available. Maybe "waiting|running|discarded"?

Waiting is actually "task=None", but task=something can be either running or discarded.

So maybe:

    <Worker name=... waiting ...>
    <Worker name=... running task=..>
    <Worker name=... running task=... discarded ...>

Keeps output short, show the state correctly.
Line 221:             self.name, self._callable, id(self)
Line 222:         )
Line 223: 
Line 224: 


-- 
To view, visit https://gerrit.ovirt.org/49722
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I558787e006d8c9cbbbff6b3dfbd744311ab31e42
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list