[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 01/16] share in jobdb: Break out $checkconstraints and move call
This must happen after we introduce our new row or it is not effective! Signed-off-by: Ian Jackson <iwj@xxxxxxxxxxxxxx> --- Osstest/JobDB/Executive.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index f69ce277..071f31f1 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -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) { -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |