[copr] skvidal-backend: add a few log outputs so I know where it is (f43545a)
skvidal at fedorahosted.org
skvidal at fedorahosted.org
Fri Nov 16 19:49:15 UTC 2012
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit f43545a565e1866133d0ffdec2cae6bc3965da0f
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Nov 16 14:47:15 2012 -0500
add a few log outputs so I know where it is
>---------------------------------------------------------------
copr-be.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 7e9e3c4..2d2df43 100644
--- a/copr-be.py
+++ b/copr-be.py
@@ -33,6 +33,11 @@ class CoprBackend(object):
if not os.path.exists(logdir):
os.makedirs(logdir, mode=0750)
+ # setup a log file to write to
+ self.logfile = self.opts.logfile
+ self.log("Starting up new copr-be instance")
+
+
if not os.path.exists(self.opts.worker_logdir):
os.makedirs(self.opts.worker_logdir, mode=0750)
@@ -40,8 +45,6 @@ class CoprBackend(object):
self.workers = []
self.added_jobs = []
- # setup a log file to write to
- self.logfile = self.opts.logfile
def read_conf(self):
"read in config file - return Bunch of config data"
@@ -94,10 +97,12 @@ class CoprBackend(object):
self.log('adding %s' % n)
if self.jobs.qsize():
+
# re-read config into opts
self.opts = self.read_conf()
# this handles starting/growing the number of workers
if len(self.workers) < self.opts.num_workers:
+ self.log("Spinning up more workers for jobs")
for i in range(self.opts.num_workers - len(self.workers)):
worker_num = len(self.workers) + 1
w = Worker(self.opts, self.jobs, worker_num)
More information about the copr-devel
mailing list