Commit ca8b6603 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Make sure we delete local webtask for snapshot.

parent 149e10da
...@@ -665,6 +665,9 @@ $project->SendEmail($portalLogs, "New Profile Created", ...@@ -665,6 +665,9 @@ $project->SendEmail($portalLogs, "New Profile Created",
"UUID: ". $profile->uuid() . "\n". "UUID: ". $profile->uuid() . "\n".
"URL: ". $profile->AdminURL() . "\n"); "URL: ". $profile->AdminURL() . "\n");
# Make sure we delete Anonymous webtask,
$webtask->Delete()
if (defined($webtask) && !defined($webtask_id));
exit(0); exit(0);
sub fatal($) sub fatal($)
...@@ -672,8 +675,14 @@ sub fatal($) ...@@ -672,8 +675,14 @@ sub fatal($)
my ($mesg) = @_; my ($mesg) = @_;
if (defined($webtask)) { if (defined($webtask)) {
$webtask->output($mesg); # Anonymous webtask, delete.
$webtask->Exited(-1); if (!defined($webtask_id)) {
$webtask->Delete();
}
else {
$webtask->output($mesg);
$webtask->Exited(-1);
}
} }
print STDERR "*** $0:\n". print STDERR "*** $0:\n".
" $mesg\n"; " $mesg\n";
...@@ -707,6 +716,10 @@ sub UserError(;$) ...@@ -707,6 +716,10 @@ sub UserError(;$)
$webtask->output($xml); $webtask->output($xml);
} }
else { else {
# Anonymous webtask, delete.
if (defined($webtask)) {
$webtask->Delete();
}
foreach my $key (keys(%errors)) { foreach my $key (keys(%errors)) {
print "$key: " . $errors{$key} . "\n"; print "$key: " . $errors{$key} . "\n";
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment