Skip to content

Commit

Permalink
Merge pull request #8755 from rhabacker/bs_dispatch-log-fixes
Browse files Browse the repository at this point in the history
bs_dispatch: Fix log output
  • Loading branch information
adrianschroeter committed Nov 22, 2019
2 parents c889538 + 0db83f2 commit 94d4a64
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/backend/bs_dispatch
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,10 @@ sub assignjob {
my $msg = "gave up after $attempt failed build attempts...";
push @args, "nobadhost=$msg" if checkbadhost(@attempts);
}
my $uri = "http://$worker->{'ip'}:$worker->{'port'}/build";
eval {
BSRPC::rpc({
'uri' => "http://$worker->{'ip'}:$worker->{'port'}/build",
'uri' => $uri,
'timeout' => 10 + int(length($infoxml) / 100000),
'request' => "PUT",
'headers' => [ "Content-Type: text/xml" ],
Expand All @@ -300,7 +301,7 @@ sub assignjob {
if ($@) {
my $err = $@;
chomp $err;
BSUtil::printlog("rpc error: $err");
BSUtil::printlog("rpc error: '$err' on accessing '$uri'");
unlink("$jobsdir/$arch/$job:status");
close F;
if ($err =~ /cannot build anything/) {
Expand Down Expand Up @@ -786,7 +787,7 @@ sub checkconstraints {
}
if (!$info->{'scheduleinfo'} || $info->{'scheduleinfo'} ne $details) {
$info->{'scheduleinfo'} = $details;
print "setting dispatch details to: $details\n";
BSUtil::printlog("setting dispatch details to: $details");
if ($sumworkers) {
setdispatchdetails($info, $arch, $job, $details);
} else {
Expand Down

0 comments on commit 94d4a64

Please sign in to comment.