X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fqueue.pm;h=8ebadd4173fe863d1e1c8f71c6f279d8d2653c3b;hb=8cc50a2ad12ec3d5bd3f31db741290664064ef06;hp=3f8763da8dcca766307ed6a53fea783aaa88fbf6;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/FS/FS/queue.pm b/FS/FS/queue.pm index 3f8763da8..8ebadd417 100644 --- a/FS/FS/queue.pm +++ b/FS/FS/queue.pm @@ -193,20 +193,6 @@ deleted as well sub delete { my $self = shift; - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my @del = qsearch( 'queue_arg', { 'jobnum' => $self->jobnum } ); - push @del, qsearch( 'queue_depend', { 'depend_jobnum' => $self->jobnum } ); - my $reportname = ''; if ( $self->status =~/^done/ ) { my $dropstring = rooturl(). '/misc/queued_report\?report='; @@ -216,20 +202,7 @@ sub delete { } my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - foreach my $del ( @del ) { - $error = $del->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; + return $error if $error; unlink $reportname if $reportname;