sub flush_resend {
my $self = shift;
- $logger->debug( "Resending..." . @_RESEND_QUEUE, DEBUG );
+ $logger->debug( "Resending..." . @_RESEND_QUEUE, INTERNAL );
while ( my $req = shift @OpenSRF::AppSession::_RESEND_QUEUE ) {
$req->resend unless $req->complete;
}
my $self = shift;
if( ! $self->{peer_handle} ) { return 0; }
my $timeout = shift || 0;
- $logger->debug( "Calling queue_wait($timeout)" , DEBUG );
+ $logger->debug( "Calling queue_wait($timeout)" , INTERNAL );
my $o = $self->{peer_handle}->process($timeout);
$self->flush_resend;
return $o;
sub queue_wait {
my $self = shift;
- OpenSRF::Utils::Logger->debug( "Calling queue_wait(@_)", DEBUG );
+ OpenSRF::Utils::Logger->debug( "Calling queue_wait(@_)", INTERNAL );
return $self->session->queue_wait(@_)
}
warn "Done running...\n";
my $time = sprintf '%.3f', time() - $start;
- $log->debug( "Method duration for {$method_name}: ". $time );
+ $log->debug( "Method duration for [$method_name]: ". $time );
if( defined( $resp ) ) {
$appreq->respond_complete( $resp );
} else {
my $start = time;
my $response = $aref->[2]->run( $aref->[0], @{$aref->[1]} );
my $time = sprintf '%.3f', time - $start;
- $log->debug( "Method duration for {[".$aref->[2]->api_name." -> ".join(', ',@{$aref->[1]}).'}: '.$time, DEBUG );
+ $log->debug( "Method duration for [".$aref->[2]->api_name." -> ".join(', ',@{$aref->[1]}).']: '.$time, DEBUG );
$appreq = $aref->[0];
if( ref( $response ) ) {
return 1;
}
+ $log->info("Received non-REQUEST message in Application handler");
+
my $res = OpenSRF::DomainObject::oilsMethodException->new(
status => "Received non-REQUEST message in Application handler");
$session->send('ERROR', $res);
# add more STATUS handling code here (as 'elsif's), for Message layer status stuff
+ #$session->state( $session->DISCONNECTED() );
+ #$session->reset;
+
} elsif ($session->state == $session->CONNECTING()) {
# This should be changed to check the type of response (is it a connectException?, etc.)
}
sub connect {
my $self = shift;
- $_->connect for (@{$self->{sessions}});
+ for my $ses (@{$self->{sessions}}) {
+ $ses->connect unless ($ses->connected);
+ }
}
sub finish {