diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2018-11-08 10:53:26 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-11-08 10:53:26 -0800 |
| commit | 495d70ed4f160e6c7ef4e9adce066bcbbc85bfef (patch) | |
| tree | c11e8aae14eb65fa882f3846cb454dfa88849680 | |
| parent | 29f94c160eb64c47d6cfba3b90f6c8f06cb1b929 (diff) | |
add option for multi-process billing to queue additional jobs for the same customer instead of skipping them, RT#81698
| -rw-r--r-- | FS/FS/Cron/bill.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index 215f0a0e6..a8a1860a4 100644 --- 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); } |
