summaryrefslogtreecommitdiff
path: root/FS/bin
diff options
context:
space:
mode:
authorjeff <jeff>2010-05-13 05:43:57 +0000
committerjeff <jeff>2010-05-13 05:43:57 +0000
commit16ac0d9bacf239ecbf24b4b7d2231981bd9efe89 (patch)
tree6d1087695730dffc36f7ae301e6a338726d15f19 /FS/bin
parent94919f6776efc3b5a0c2117f2147a1730beee2e8 (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 d5d84cced..3734bf893 100644
--- a/FS/bin/freeside-queued
+++ b/FS/bin/freeside-queued
@@ -207,10 +207,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;