diff options
author | Michal Minar <miminar@redhat.com> | 2013-02-05 12:35:39 +0100 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-02-05 12:35:39 +0100 |
commit | 1d60a267af3eb94f8f158b4cf8abf3cc254611a1 (patch) | |
tree | c11027123195b418b99389a19958274102e6d136 /src/software | |
parent | ba52a771a8fc423f6e2fa6f85145da22778c761f (diff) | |
download | openlmi-providers-1d60a267af3eb94f8f158b4cf8abf3cc254611a1.tar.gz openlmi-providers-1d60a267af3eb94f8f158b4cf8abf3cc254611a1.tar.xz openlmi-providers-1d60a267af3eb94f8f158b4cf8abf3cc254611a1.zip |
logging improvements
made tracing message for function exit match the entry one
added threading related logging for YumDB
Diffstat (limited to 'src/software')
-rw-r--r-- | src/software/openlmi/software/yumdb/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/software/openlmi/software/yumdb/__init__.py b/src/software/openlmi/software/yumdb/__init__.py index 0cccdea..0dc9050 100644 --- a/src/software/openlmi/software/yumdb/__init__.py +++ b/src/software/openlmi/software/yumdb/__init__.py @@ -139,14 +139,25 @@ class YumDB(singletonmixin.Singleton): self._expected.remove(job.jobid) return self._replies.pop(job.jobid) else: + cmpi_logging.logger.debug( + "[jobid=%d] another %s threads expecting reply," + " suspending...", job.jobid, len(self._expected) - 1) self._reply_cond.wait() + cmpi_logging.logger.debug( + "[jobid=%d] received reply, waking up", job.jobid) while True: + cmpi_logging.logger.debug("[jobid=%d] blocking on downlink queue", + job.jobid) jobid, reply = self._worker.downlink.get() with self._reply_lock: if jobid != job.jobid: + cmpi_logging.logger.debug("[jobid=%d] received reply" + " for another thread (jobid=%d)", job.jobid, jobid) self._replies[jobid] = reply self._reply_cond.notifyAll() else: + cmpi_logging.logger.debug( + "[jobid=%d] received desired reply", job.jobid) self._expected.remove(job.jobid) if len(self._expected): self._reply_cond.notify() |