From 702da969a6030e8a3b5f4b630336c6c7dded4b3e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Mar 2009 16:46:01 +0000 Subject: [PATCH] * Ordering by timestamp isn't a good idea here since a newer revision might finish building before an older revision, and therefore have a lower timestamp. --- src/script/hydra_scheduler.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/hydra_scheduler.pl b/src/script/hydra_scheduler.pl index 9ac6fd68..d6e6d4d9 100755 --- a/src/script/hydra_scheduler.pl +++ b/src/script/hydra_scheduler.pl @@ -156,7 +156,7 @@ sub fetchInputAlt { # Pick the most recent successful build of the specified job. (my $prevBuild) = $db->resultset('Builds')->search( {finished => 1, project => $project->name, jobset => $jobset->name, job => $jobName, buildStatus => 0}, - {join => 'resultInfo', order_by => "timestamp DESC", rows => 1}); + {join => 'resultInfo', order_by => "id DESC", rows => 1}); if (!defined $prevBuild || !isValidPath($prevBuild->outpath)) { print STDERR "no previous build available for `$jobName'";