From f08f920238fc31428fd559a76c3d5f170a913ddf Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Tue, 24 Oct 2006 10:16:59 +0000
Subject: [PATCH] Prefer new jobs to old jobs.

* distribute-tasks (read_new_tasks): Insert new tasks first, on the
  assumption that it is more important to back up new areas than to
  refresh old areas.
---
 ChangeLog        | 6 ++++++
 distribute-tasks | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 7fbf658..665f226 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-10-24  Per Cederqvist  <ceder@sedesopim.lysator.liu.se>
 
+	Prefer new jobs to old jobs.
+
+	* distribute-tasks (read_new_tasks): Insert new tasks first, on
+	the assumption that it is more important to back up new areas than
+	to refresh old areas.
+
 	LYSrdiff now randomizes the backup order a bit less.
 
 	* distribute-tasks (ordered_tasks): New global variable.
diff --git a/distribute-tasks b/distribute-tasks
index 6983029..e3aeacc 100755
--- a/distribute-tasks
+++ b/distribute-tasks
@@ -87,7 +87,7 @@ def read_new_tasks():
         if (info.host(), info.directory()) not in tasks_per_source:
             info.set_lysrdiffpart(newtasks())
             tasks_per_source[(info.host(), info.directory())] = info
-	    ordered_tasks.append(info)
+	    ordered_tasks.insert(0, info)
             new_found = True
 
     return new_found
-- 
GitLab