Skip to content

Commit

Permalink
[backend] add support for suspendproject and resumeproject
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Oct 25, 2017
1 parent 44924b9 commit 09dd0d6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/backend/bs_srcserver
Original file line number Diff line number Diff line change
Expand Up @@ -3818,6 +3818,14 @@ sub docommand {
my %archfilter = map {$_ => 1} @{$cgi->{'arch'} || []};

my $proj = BSRevision::readproj_local($projid);
if ($cgi->{'cmd'} eq 'suspendproject') {
notify_repservers('suspendproject', $projid, undef, $cgi->{'comment'} || 'suspendproject');
return $BSStdServer::return_ok;
}
if ($cgi->{'cmd'} eq 'resumeproject') {
notify_repservers('package', $projid); # also resumes the project
return $BSStdServer::return_ok;
}
my @prpas;
for my $repo (@{$proj->{'repository'} || []}) {
next if %repoidfilter && !$repoidfilter{$repo->{'name'}};
Expand Down Expand Up @@ -6136,7 +6144,7 @@ my $dispatches = [
'PUT:/build/_dispatchprios' => \&putdispatchprios,
'/build/_dispatchprios' => \&getdispatchprios,
'/build/$project/_availablebinaries url:* path:prp* arch*' => \&getavailablebinaries,
'POST:/build/$project cmd: repository* arch* package* code:* wipe:*' => \&docommand,
'POST:/build/$project cmd: repository* arch* package* code:* wipe:* comment:?' => \&docommand,
'/build/$project' => \&getrepositorylist,
'/build/$project/_result oldstate:md5? view:resultview* lastbuild:bool? repository* arch* package* code:* multibuild:bool? locallink:bool?' => \&getresult,
'/build/$project/$repository' => \&getarchlist,
Expand Down

0 comments on commit 09dd0d6

Please sign in to comment.