summaryrefslogtreecommitdiff
path: root/FS/bin
diff options
context:
space:
mode:
authorjeff <jeff>2010-05-13 05:43:22 +0000
committerjeff <jeff>2010-05-13 05:43:22 +0000
commit0bdb687a64bc8340f9835bc0659be93166cbeb09 (patch)
tree8d308cc932f05d8fb832c87ee392e514fd80b46c /FS/bin
parenta087f56c114ee266707275f1a5f2a94b60232865 (diff)
cope with poor tax liability report performance by allowing queuing of reports RT#8274
Diffstat (limited to 'FS/bin')
-rw-r--r--FS/bin/freeside-queued8
1 files changed, 6 insertions, 2 deletions
diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued
index ffd017a41..c9b0edb10 100644
--- a/FS/bin/freeside-queued
+++ b/FS/bin/freeside-queued
@@ -208,10 +208,14 @@ while (1) {
warn 'running "&'. $ljob->job. '('. join(', ', @args). ")\n" if $DEBUG;
eval $eval; #throw away return value? suppose so
if ( $@ ) {
- warn "job $eval failed";
my %hash = $ljob->hash;
- $hash{'status'} = 'failed';
$hash{'statustext'} = $@;
+ if ( $hash{'statustext'} =~ /\/misc\/queued_report/ ) { #use return?
+ $hash{'status'} = 'done';
+ } else {
+ $hash{'status'} = 'failed';
+ warn "job $eval failed";
+ }
my $fjob = new FS::queue( \%hash );
my $error = $fjob->replace($ljob);
die $error if $error;