bodhi/admin.py | 4 ++--
bodhi/masher.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit fe03f84b5575ec1d2c77c1c3f18d221680824363
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 4 23:55:19 2008 -0400
Update our masher state lockfile with any completed repos if a mash fails
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 795a59f..6934a75 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -614,6 +614,18 @@ class MashTask(Thread):
if self.success:
log.debug("Success! Unlocking repo")
self._unlock()
+ else:
+ # Update our masher state lockfile with any completed
+ # repos that we were able to compose during this push
+ log.debug("Mash unsuccessful, updating state lock")
+ mash_lock = join(config.get('mashed_dir'), 'MASHING')
+ lock = file(mash_lock, 'r')
+ masher_state = pickle.load(lock)
+ lock.close()
+ masher_state['composed_repos'] = self.composed_repos
+ lock = file(mash_lock, 'w')
+ pickle.dump(masher_state)
+ lock.close()
log.debug("MashTask done")
masher.done(self)
commit 4df99dd8f2a196aa3c36927d61c1bf6e8bbb21e3
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 4 23:55:00 2008 -0400
Add completed repos to our composed_repos list
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 06eb15c..795a59f 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -534,6 +534,7 @@ class MashTask(Thread):
out.close()
log.info("Wrote mash output to %s" % mash_output)
self.log = mash_output
+ self.composed_repos.append(mashdir)
self.mashing = False
log.debug("Mashed for %s seconds" % (time.time() - t0))
commit 7c1becb6f45fc682c3ddc6fee4ac562585ebade7
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 4 23:54:37 2008 -0400
See if we can fix this status message
diff --git a/bodhi/admin.py b/bodhi/admin.py
index 7995281..3da5e0b 100644
--- a/bodhi/admin.py
+++ b/bodhi/admin.py
@@ -134,8 +134,8 @@ class AdminController(Controller, SecureResource):
# If we're not The Masher, then proxy this request to it
if config.get('masher'):
data = self._masher_request('/admin/mash', updates=updates,
resume=resume) or {}
- flash_log('Push request %s' % data.get('success') and
'succeeded'
- or 'failed')
+ flash_log('Push request %s' % (data.get('success') and
'succeeded'
+ or 'failed'))
raise redirect('/admin/masher')
from bodhi.masher import masher
Show replies by date