more debugging for weird bill lockup, RT#8993
authorivan <ivan>
Fri, 2 Jul 2010 18:56:28 +0000 (18:56 +0000)
committerivan <ivan>
Fri, 2 Jul 2010 18:56:28 +0000 (18:56 +0000)
FS/FS/cust_main.pm

index e98f700..2936063 100644 (file)
@@ -2758,8 +2758,14 @@ sub bill {
   local $FS::UID::AutoCommit = 0;
   my $dbh = dbh;
 
+  warn "$me acquiring lock on customer ". $self->custnum. "\n"
+    if $DEBUG;
+
   $self->select_for_update; #mutex
 
+  warn "$me running pre-bill events for customer ". $self->custnum. "\n"
+    if $DEBUG;
+
   my $error = $self->do_cust_event(
     'debug'      => ( $options{'debug'} || 0 ),
     'time'       => $invoice_time,
@@ -2771,6 +2777,9 @@ sub bill {
     return $error;
   }
 
+  warn "$me done running pre-bill events for customer ". $self->custnum. "\n"
+    if $DEBUG;
+
   #keep auto-charge and non-auto-charge line items separate
   my @passes = ( '', 'no_auto' );