diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-11-15 18:00:08 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-11-15 18:00:08 -0800 |
commit | e20da7110c624325f2a81a9d720d3493f7263ecc (patch) | |
tree | fffa249436daae3dff555f1af8502a7da186f868 /FS/FS/queue.pm | |
parent | b77fc573901a0ae334b9b382e00ca9db60401d16 (diff) |
fix job queue operation with FKs, RT#13971
Diffstat (limited to 'FS/FS/queue.pm')
-rw-r--r-- | FS/FS/queue.pm | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/FS/FS/queue.pm b/FS/FS/queue.pm index 3f8763d..8ebadd4 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; |