[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-102-g4c48ac2

Andreas Beckmann debian at abeckmann.de
Fri Aug 3 08:51:49 UTC 2012


The following commit has been merged in the develop branch:
commit 913ade58045062b5b5b0a7749ed17040b72ce8ed
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Fri Jul 20 13:25:46 2012 +0200

    p-s: enter recycle mode
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index f3f1432..55c7db6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -47,6 +47,10 @@ piuparts (0.46) UNRELEASED; urgency=low
     - Try to unreserve all reserved logs after interrupt.
     - Add SIGHUP handler that triggers flushing finished logs.  Flushing (all
       sections) will be done after the current test has finished.
+    - Enter logfile recycling mode if no section has packages left for regular
+      processing.  Recycle logfiles until a section becomes available for
+      regular processing.  If no logfiles could be recycled, retry after an
+      hour.
   * piuparts-report.py:
   * Simplify running piuparts from GIT.
   * Reorganize layout in the GIT repository to reduce path nesting and length.
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 0cb2d79..597cc08 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -380,6 +380,8 @@ class Section:
 
         logging.info("-------------------------------------------")
         action = "Running"
+        if recycle:
+            action = "Recycling"
         if not do_processing:
             action = "Flushing"
         logging.info("%s section %s (precedence=%d)" \
@@ -774,6 +776,15 @@ def main():
             continue
 
         if test_count == 0:
+            # try to recycle old logs
+            # round robin recycling of all sections is ensured by the recycle_wait_until timestamps
+            idle_until = min([section.sleep_until() for section in sections])
+            for section in sorted(sections, key=lambda section: section.sleep_until(recycle=True)):
+                test_count += section.run(recycle=True)
+                if test_count > 0 and idle_until < time.time():
+                    break
+
+        if test_count == 0:
             now = time.time()
             sleep_until = min([now + int(global_config["idle-sleep"])] + [section.sleep_until() for section in sections])
             if (sleep_until > now):

-- 
piuparts git repository



More information about the Piuparts-commits mailing list