[copr] skvidal-backend: if any worker dies and we don't know why - raise an exception to kill us off b/c until we know all of the reasons why I'd rather just stop. (6159878)

skvidal at fedoraproject.org skvidal at fedoraproject.org
Tue Dec 4 21:25:36 UTC 2012


Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : skvidal-backend

>---------------------------------------------------------------

commit 6159878f050c4739d84f32a8558ab36c1230298f
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Dec 4 16:23:10 2012 -0500

    if any worker dies and we don't know why - raise an exception to kill us off b/c
    until we know all of the reasons why I'd rather just stop.


>---------------------------------------------------------------

 copr-be.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/copr-be.py b/copr-be.py
index 0d20e20..2cc0fba 100644
--- a/copr-be.py
+++ b/copr-be.py
@@ -117,6 +117,9 @@ class CoprBackend(object):
                 #       #insert a poison pill? Kill after something? I dunno.
                 # FIXME - if a worker bombs out - we need to check them
                 # and startup a new one if it happens
+            for w in self.workers:
+                if not w.is_alive():
+                    raise errors.CoprBackendError, "Worker died unexpectedly"
 
             time.sleep(self.opts.sleeptime)
 



More information about the copr-devel mailing list