Author: spadkins
Date: Fri Jul 18 11:28:45 2008
New Revision: 11540

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

Log:
commented out the really long log statement, as even though the log_level was 
set to 5 it was still making it into production somehow

Modified: p5ee/trunk/App-WorkQueue/lib/App/WorkQueue.pm
==============================================================================
--- p5ee/trunk/App-WorkQueue/lib/App/WorkQueue.pm       (original)
+++ p5ee/trunk/App-WorkQueue/lib/App/WorkQueue.pm       Fri Jul 18 11:28:45 2008
@@ -530,7 +530,7 @@
                             ### TODO: this is a debugging hack that shouldn't 
stay in it
                             my $db = $self->_db();
                             $dump_entry .= "last sql stmt[$db->{sql}]\n";
-                            $context->log({level=>5}, "$self->{name} : 
Acquisition failed : $dump_entry\n");
+                            #$context->log({level=>5}, "$self->{name} : 
Acquisition failed : $dump_entry\n");
                         }
                         $entry = undef;
                     }
@@ -967,17 +967,19 @@
 
 sub schedule_entry_acquisition {
     &App::sub_entry if ($App::trace);
-    my ($self, $event, $max_events) = @_;
+    my ($self, $event, $max_events, $event_args) = @_;
     $max_events ||= 1;
+    $event_args ||= {};
     $self->{acquisition_event} = $event;
     my $context = $self->{context};
-    $context->extend_event_loop($self, "dispatch_events", [$max_events]);
+    $context->extend_event_loop($self, "dispatch_events", [$max_events, 
$event_args]);
     &App::sub_exit() if ($App::trace);
 }
 
 sub dispatch_events {
     &App::sub_entry if ($App::trace);
-    my ($self, $max_events) = @_;
+    my ($self, $max_events, $event_args) = @_;
+    my $context = $self->{context};
     $max_events = 1 if (!$max_events);
     my $num_events = 0;
     if ($self->{acquisition_event}) {
@@ -988,7 +990,11 @@
             last if (!$entry);
             $num_events++;
             %event = %{$self->{acquisition_event}};
-            $event{args} = [ $entry ];
+            ### TODO: figure out how to abstract out the industry part of 
this!!!
+            #$event{args} = [ $self->{acquisition_event}{industry}, $entry ];
+            if ($event_args) {
+                $event{args} = [ $entry, $event_args ];
+            }
             $context->send_event(\%event);
         }
     }
@@ -1502,6 +1508,7 @@
         # do nothing
     }
     else {
+        my $context = $self->{context};
         my ($limit);
         foreach my $c (@$global_constraints) {
             $limit = $c->[$GCONSTR_LIMITS]{$c->[$GCONSTR_LIMIT_ATTRIB]};
@@ -1546,6 +1553,7 @@
     &App::sub_entry if ($App::trace);
     my ($self, $entry, $constraints) = @_;
     my $complies = 1;
+    my $context = $self->{context};
 
     my $global_constraints = $self->{global_constraints};
     if (!$global_constraints || $#$global_constraints == -1) {

Reply via email to