Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
commit 7437f45c069593a1ad7c3b1995e41e0301e6be29 Author: Seth Vidal skvidal@fedoraproject.org Date: Tue Jan 15 12:14:27 2013 -0500
- sleep a bit between fetchjob actions - actually log stuff :)
copr-be.py | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/copr-be.py b/copr-be.py index 881c30d..78256a7 100644 --- a/copr-be.py +++ b/copr-be.py @@ -73,6 +73,8 @@ class CoprJobGrab(multiprocessing.Process): self.jobs.put(f) self.added_jobs.append(n) self.event('adding to work queue id %s' % n) + time.sleep(self.opts.sleeptime) +
class CoprLog(multiprocessing.Process): """log mechanism where items from the events queue get recorded""" @@ -109,9 +111,9 @@ class CoprLog(multiprocessing.Process): def run(self): abort = False while not abort: - for e in self.events.get(): - if 'when' in e and 'who' in e and 'what' in e: - self.log(e) + e = self.events.get() + if 'when' in e and 'who' in e and 'what' in e: + self.log(e)
class CoprBackend(object): """core process - starts/stops/initializes workers"""
copr-devel@lists.fedorahosted.org