@@ -582,6 +582,11 @@ END
VALUES (?, ?, ?, ?, ?, ?, ? )
END
+ my $checkconstraints = sub {
+ $constraintsq->execute($hostname, $ttaskid);
+ $constraintsq->fetchrow_array() or confess "$hostname ?";
+ };
+
my $ojvn = "$ho->{Ident}_lifecycle";
if (length $r{$ojvn}) {
@@ -654,8 +659,6 @@ END
push @lifecycle, "$omarks$otj:$o->{stepno}$osuffix";
}
}
- $constraintsq->execute($hostname, $ttaskid);
- $constraintsq->fetchrow_array() or confess "$hostname ?";
if (defined $flight) {
$insertq->execute($hostname, $ttaskid,
@@ -670,6 +673,7 @@ END
undef,
undef,undef);
}
+ $checkconstraints->();
});
if (defined $flight) {
This must happen after we introduce our new row or it is not effective! Signed-off-by: Ian Jackson <iwj@xenproject.org> --- Osstest/JobDB/Executive.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)