Skip to content

Commit

Permalink
[backend] send workerid with getbinary requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Jun 6, 2018
1 parent fa3b262 commit 19fe2c2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -1213,13 +1213,16 @@ sub trygetbinariesproxy_preinstallimage {
my ($server, $filename, $img) = @_;
return undef unless $getbinariesproxy;
my $res;
my @args;
push @args, "workerid=$workerid" if defined $workerid;
push @args, "prpa=$img->{'prpa'}", "hdrmd5=$img->{'hdrmd5'}", "sizek=$img->{'sizek'}", "path=$img->{'path'}";
eval {
$res = BSRPC::rpc({
'uri' => "$getbinariesproxy/getpreinstallimage",
'filename' => $filename,
'timeout' => $gettimeout,
'receiver' => \&BSHTTP::file_receiver,
}, undef, "server=$server", "prpa=$img->{'prpa'}", "hdrmd5=$img->{'hdrmd5'}", "sizek=$img->{'sizek'}", "path=$img->{'path'}");
}, undef, "server=$server", @args);
};
if ($@) {
warn($@);
Expand Down Expand Up @@ -1251,6 +1254,7 @@ sub getbinaries_cache {
}
if ($cachedir && !$bvl) {
my @args;
push @args, "workerid=$workerid" if defined $workerid;
push @args, "project=$projid";
push @args, "repository=$repoid";
push @args, "arch=$arch";
Expand Down Expand Up @@ -1340,6 +1344,7 @@ sub getbinaries_cache {
manage_cache($cachesize - $downloadsizek * 1024);
}
my @args;
push @args, "workerid=$workerid" if defined $workerid;
push @args, "project=$projid";
push @args, "repository=$repoid";
push @args, "arch=$arch";
Expand Down Expand Up @@ -1776,6 +1781,7 @@ sub getpreinstallimage_metas {

# get missing ones for the repo server for this build
my @args;
push @args, "workerid=$workerid" if defined $workerid;
push @args, "project=$buildinfo->{'project'}";
push @args, "repository=$buildinfo->{'repository'}";
push @args, "arch=$buildinfo->{'arch'}";
Expand Down Expand Up @@ -2342,6 +2348,7 @@ sub getbinaries {
my $ddir = "$srcdir/containers/$repo->{'project'}/$repo->{'repository'}";
mkdir_p($ddir);
my @args;
push @args, "workerid=$workerid" if defined $workerid;
push @args, "project=$repo->{'project'}";
push @args, "repository=$repo->{'repository'}";
push @args, "arch=$buildinfo->{'arch'}";
Expand Down

0 comments on commit 19fe2c2

Please sign in to comment.