Skip to content

Commit

Permalink
[backend] prune notification info
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 2, 2013
1 parent 69d6af4 commit 0f48954
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/backend/bs_repserver
Original file line number Diff line number Diff line change
Expand Up @@ -1788,11 +1788,20 @@ sub putjob {
last;
}

# prune notification info
my %ninfo;
for (qw{project package repository arch rev srcmd5 verifymd5 readytime reason versrel bcnt release}) {
$ninfo{$_} = $info->{$_} if defined $info->{$_};
}
$ninfo{'starttime'} = $jobstatus->{'starttime'};
$ninfo{'endtime'} = $jobstatus->{'endtime'};
$ninfo{'workerid'} = $jobstatus->{'workerid'};

if ($cgi->{'code'} && $cgi->{'code'} eq 'unchanged') {
$jobstatus->{'result'} = 'unchanged';
notify('BUILD_UNCHANGED', $info);
notify('BUILD_UNCHANGED', \%ninfo);
} else {
notify($jobstatus->{'result'} eq 'succeeded' ? 'BUILD_SUCCESS' : 'BUILD_FAIL', $info);
notify($jobstatus->{'result'} eq 'succeeded' ? 'BUILD_SUCCESS' : 'BUILD_FAIL', \%ninfo);
}

# calculate binary info to speed up scheduler
Expand Down

0 comments on commit 0f48954

Please sign in to comment.