Ensure when-stmt jobs always run in predictable (name) order.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 21 Feb 2012 12:47:48 +0000 (12:47 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 21 Feb 2012 12:53:31 +0000 (12:53 +0000)
daemon/daemon.ml

index 80f2cbd..3aee15a 100644 (file)
@@ -181,6 +181,8 @@ and reevaluate_whenjobs jobnames =
   in
   let set = loop StringSet.empty jobnames in
   let jobnames = StringSet.elements set in
+  (* Ensure the jobs always run in predictable (name) order. *)
+  let jobnames = List.sort compare jobnames in
   List.iter run_job
     (List.map (fun jobname -> StringMap.find jobname !jobs) jobnames)