projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6276821
)
add option for multi-process billing to queue additional jobs for the same customer...
author
Ivan Kohler
<ivan@freeside.biz>
Thu, 8 Nov 2018 18:53:23 +0000
(10:53 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Thu, 8 Nov 2018 18:53:23 +0000
(10:53 -0800)
FS/FS/Cron/bill.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Cron/bill.pm
b/FS/FS/Cron/bill.pm
index
68d5476
..
b0d1f32
100644
(file)
--- a/
FS/FS/Cron/bill.pm
+++ b/
FS/FS/Cron/bill.pm
@@
-117,6
+117,7
@@
sub bill {
}
);
+ #avoid queuing another job if there's one still waiting to run
next if @waiting && ! $opt{'q'};
#add job to queue that calls bill_and_collect with options
@@
-128,6
+129,7
@@
sub bill {
my $error = $queue->insert( 'custnum'=>$custnum, %args );
die $error if $error;
+ #wait until the earler jobs complete
foreach $waiting_queue (@waiting) {
$queue->depend_insert($waiting_queue->jobnum);
}