Skip to content

Commit

Permalink
[backend] add some log output for project suspend/resume
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Apr 13, 2016
1 parent 762c300 commit 982a064
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/BSSched/EventHandler.pm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ sub event_package {
my $packid = $ev->{'package'};
push @{$fetchprojpacks->{$projid}}, $packid;
$deepcheck->{$projid} = 1 if !defined $packid;
delete $ectx->{'gctx'}->{'projsuspended'}->{$projid} if !defined $packid;
if (!defined($packid) && $ectx->{'gctx'}->{'projsuspended'}->{$projid}) {
print "resuming project $projid\n";
delete $ectx->{'gctx'}->{'projsuspended'}->{$projid};
}
}

=head2 event_project - TODO: add summary
Expand Down Expand Up @@ -518,6 +521,7 @@ sub event_suspendproject {
my $projid = $ev->{'project'};
my $gctx = $ectx->{'gctx'};
return unless $ev->{'job'};
print "suspending project $projid: $ev->{'job'}\n";
$gctx->{'projsuspended'}->{$projid} = $ev->{'job'};
# try to set the repo state right away
my $projpacks = $gctx->{'projpacks'};
Expand Down

0 comments on commit 982a064

Please sign in to comment.