Skip to content

Commit

Permalink
[backend] wipepublishedlock: send event to publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Nov 4, 2013
1 parent b52d439 commit c9bfadb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/bs_repserver
Expand Up @@ -2194,7 +2194,8 @@ sub getresult {

# special call that completely wipes the published area from a prp
sub wipepublishedlocked {
my ($prp) = @_;
my ($projid, $repoid) = @_;
my $prp = "$projid/$repoid";
return unless -d "$reporoot/$prp";
local *F;
BSUtil::lockopen(\*F, '>', "$reporoot/$prp/.finishedlock");
Expand All @@ -2206,6 +2207,7 @@ sub wipepublishedlocked {
rmdir($r);
}
close F;
forwardevent({}, 'publish', $projid, undef, $repoid, undef);
}

sub docommand {
Expand Down Expand Up @@ -2254,7 +2256,7 @@ sub docommand {
}
} elsif ($cmd eq 'wipepublishedlocked') {
my $prp = "$projid/$repoid";
wipepublishedlocked($prp) unless $wipepublishedlockeddone{$prp};
wipepublishedlocked($projid, $repoid) unless $wipepublishedlockeddone{$prp};
$wipepublishedlockeddone{$prp} = 1;
} elsif ($cmd eq 'wipe') {
undef $allpacks;
Expand Down

0 comments on commit c9bfadb

Please sign in to comment.