Author: spadkins
Date: Tue Jan  8 11:38:31 2008
New Revision: 10496

Modified:
   p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm

Log:
added call to _maintain_queue_buffers to _init, and added logging to know when 
_release_in_db might fail to try to track down our negative buffer sizes

Modified: p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm
==============================================================================
--- p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm    (original)
+++ p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm    Tue Jan  8 
11:38:31 2008
@@ -45,6 +45,7 @@
     my ($self,$args) = @_;
     $self->_init_attribs($args);
     $self->_init_db($args);
+    $self->_maintain_queue_buffers();
     &App::sub_exit() if ($App::trace);
 }
 
@@ -352,6 +353,11 @@
         CORE::push(@values,  @$values);
     }
     my $released = $self->update($entry,[EMAIL PROTECTED],[EMAIL PROTECTED]);
+    if (!$released) {
+        my $context = $self->{context};
+        my $db = $self->_db();
+        $context->log({level=>2}, "WorkQueue::Repository : $self->{name} : 
_release_in_db RELEASE FAILED : 
[$entry->{shop_request_id}|$entry->{subrequest_id}] : last sql 
stmt[$db->{sql}]\n");
+    }
 
     &App::sub_exit($released) if ($App::trace);
     return($released);

Reply via email to