Author: spadkins
Date: Tue Sep 25 12:02:10 2007
New Revision: 9999

Modified:
   p5ee/trunk/App-Context/lib/App/Context/POE/ClusterController.pm
   p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm

Log:
small changes to make the node send immediate status to the controller

Modified: p5ee/trunk/App-Context/lib/App/Context/POE/ClusterController.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context/POE/ClusterController.pm     
(original)
+++ p5ee/trunk/App-Context/lib/App/Context/POE/ClusterController.pm     Tue Sep 
25 12:02:10 2007
@@ -113,7 +113,7 @@
     &App::sub_entry if ($App::trace);
     my ($self, $kernel, $session_name) = @_[OBJECT, KERNEL, ARG1];
     $self->log({level=>2},"POE: ikc_register ($session_name)\n") if 
$self->{options}{poe_ikc_debug};
-    if ($session_name =~ /^ikc_([^_]+)_(\d+)$/) {
+    if ($session_name =~ /^poe_([^_]+)_(\d+)$/) {
         my $node = "$1:$2";
         $self->set_node_up($node);
     }

Modified: p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm   (original)
+++ p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm   Tue Sep 25 
12:02:10 2007
@@ -133,9 +133,9 @@
     my ($self, $kernel, $remote_kernel_id, $node) = @_[OBJECT, KERNEL, ARG0, 
ARG3];
     $self->log({level=>2},"POE: ikc_register ($remote_kernel_id; 
node=$node)\n") if $self->{options}{poe_ikc_debug};
     $self->{controller_up} = 1;
-    my ($retval);
-    &App::sub_exit($retval) if ($App::trace);
-    return($retval);
+    $self->send_node_status();
+    &App::sub_exit() if ($App::trace);
+    return();
 }
 
 sub ikc_unregister {
@@ -162,7 +162,7 @@
     my $node_heartbeat  = $self->{options}{node_heartbeat} || 60;
     $self->schedule_event(
         method => "send_node_status",
-        time => time()+5,  # immediately ...
+        time => time(),  # immediately ...
         interval => $node_heartbeat,  # and every X seconds hereafter
     );
     my $node_alarm_interval = $self->{options}{node_alarm_interval} || 5;

Reply via email to