projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 80488 Prevent rollback of system log messages
[freeside.git]
/
FS
/
FS
/
Cron
/
bill.pm
diff --git
a/FS/FS/Cron/bill.pm
b/FS/FS/Cron/bill.pm
index
68d5476
..
19baac0
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
next if @waiting && ! $opt{'q'};
#add job to queue that calls bill_and_collect with options
@@
-128,7
+129,8
@@
sub bill {
my $error = $queue->insert( 'custnum'=>$custnum, %args );
die $error if $error;
my $error = $queue->insert( 'custnum'=>$custnum, %args );
die $error if $error;
- foreach $waiting_queue (@waiting) {
+ #wait until the earler jobs complete
+ foreach my $waiting_queue (@waiting) {
$queue->depend_insert($waiting_queue->jobnum);
}
$queue->depend_insert($waiting_queue->jobnum);
}