Skip to content

Commit

Permalink
[backend] add optional workerid parameters for worker calls
Browse files Browse the repository at this point in the history
This can make it easier to find workers that have a too small
disk cache.
  • Loading branch information
mlschroe committed Jun 6, 2018
1 parent e1dae24 commit fa3b262
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/backend/bs_getbinariesproxy
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ sub hello {

my $dispatches = [
'/' => \&hello,
'/getbinaries $project $repository $arch binaries: nometa:bool? metaonly:bool? server:' => \&getbinaries,
'/getpreinstallimage $prpa $hdrmd5:md5 path: sizek:num? server:' => \&getpreinstallimage,
'/getbinaries $project $repository $arch binaries: nometa:bool? metaonly:bool? workerid? server:' => \&getbinaries,
'/getpreinstallimage $prpa $hdrmd5:md5 path: sizek:num? workerid? server:' => \&getpreinstallimage,
];

my $conf = {
Expand Down
13 changes: 8 additions & 5 deletions src/backend/bs_srcserver
Original file line number Diff line number Diff line change
Expand Up @@ -6342,13 +6342,16 @@ my $dispatches = [
'POST:/worker cmd=checkconstraints $project $repository $arch $package' => \&checkconstraints,

# worker calls
'/getsources $project $package $srcmd5:md5' => \&getsources,
'/getconfig $project $repository path:prp*' => \&getbuildconfig,
'/getsources $project $package $srcmd5:md5 workerid?' => \&getsources,
'/getconfig $project $repository path:prp* workerid?' => \&getbuildconfig,
'/getsslcert $project autoextend:bool? workerid?' => \&getsslcert,
'/getbinaries $project $repository $arch binaries: nometa:bool? workerid?' => \&worker_getbinaries,
'/getbinaryversions $project $repository $arch binaries: nometa:bool? workerid?' => \&worker_getbinaryversions,

# publisher/signer calls
'/getsignkey $project withpubkey:bool? autoextend:bool? withalgo:bool?' => \&getsignkey,
'/getsslcert $project autoextend:bool?' => \&getsslcert,
'/getbinaries $project $repository $arch binaries: nometa:bool?' => \&worker_getbinaries,
'/getbinaryversions $project $repository $arch binaries: nometa:bool?' => \&worker_getbinaryversions,

# event/notification handling
'!- /lastevents $filter:* start:num? obsname:?' => \&lastevents,
'/lastnotifications start:num? view:? block:bool? noprune:bool?' => \&lastnotifications,
'/notificationpayload/$payloadkey:filename' => \&getnotificationpayload,
Expand Down

0 comments on commit fa3b262

Please sign in to comment.