From 7f96d83036f96b8cff79aa367b3896afcf6ecaf5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 17 Oct 2013 15:02:20 +0100 Subject: [PATCH] Executive: alloc_resources resourcecall must return 0 or 1 as recognised in 34ac49df0a45; in fact everything does; remove all references to $ok=2 --- Osstest/Executive.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index ab3da9c2..9627036c 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -350,7 +350,6 @@ sub alloc_resources { # values of $ok # 0 rollback, wait and try again # 1 commit, completed ok - # 2 commit, wait and try again # $bookinglist should be undef or a hash for making a booking # # $resourcecall should not look at tasks.live @@ -388,7 +387,7 @@ sub alloc_resources { } } - while ($ok==0 || $ok==2) { + while ($ok==0) { my $bookinglist; if (!eval { if (!defined $qserv) { @@ -484,9 +483,8 @@ sub alloc_resources { print $qserv "thought-done\n" or die $!; } elsif ($ok<0) { return 1; - } else { # 0 or 2 - logm("resource allocation: deferring") if $ok==0; - logm("resource allocation: partial commit, deferring"); + } else { # 0 + logm("resource allocation: deferring"); print $qserv "thought-wait\n" or die $!; } $_= <$qserv>; defined && m/^OK thought\s$/ or die "$_ ?"; -- 2.39.5