From 495d70ed4f160e6c7ef4e9adce066bcbbc85bfef Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 8 Nov 2018 10:53:26 -0800 Subject: [PATCH] add option for multi-process billing to queue additional jobs for the same customer instead of skipping them, RT#81698 --- FS/FS/Cron/bill.pm | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.11.0