From: Richard W.M. Jones Date: Tue, 21 Feb 2012 12:47:48 +0000 (+0000) Subject: Ensure when-stmt jobs always run in predictable (name) order. X-Git-Tag: 0.0.1~19 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=8d48e7ada3131185cde1ba17da36518061034872;p=whenjobs.git Ensure when-stmt jobs always run in predictable (name) order. --- diff --git a/daemon/daemon.ml b/daemon/daemon.ml index 80f2cbd..3aee15a 100644 --- a/daemon/daemon.ml +++ b/daemon/daemon.ml @@ -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)