From: Mike Taylor Date: Thu, 2 Nov 2006 16:11:44 +0000 (+0000) Subject: Add warnings if running tasks leaves the ZOOM connections idle. (Doesn't currently... X-Git-Tag: CPAN-v1.02~54^2~784 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=dd20ee8778b01e4727f2fabfb9e4d5a4dcfb935d Add warnings if running tasks leaves the ZOOM connections idle. (Doesn't currently help, I think because is_idle() returns 0 if there is an END event waiting.) --- diff --git a/lib/ZOOM/IRSpy/Task/Connect.pm b/lib/ZOOM/IRSpy/Task/Connect.pm index d0980dc..5080a7a 100644 --- a/lib/ZOOM/IRSpy/Task/Connect.pm +++ b/lib/ZOOM/IRSpy/Task/Connect.pm @@ -1,4 +1,4 @@ -# $Id: Connect.pm,v 1.5 2006-10-25 13:36:02 mike Exp $ +# $Id: Connect.pm,v 1.6 2006-11-02 16:11:44 mike Exp $ # See ZOOM/IRSpy/Task/Search.pm for documentation @@ -25,6 +25,8 @@ sub run { my $conn = $this->conn(); $conn->log("irspy_task", "connecting"); $conn->connect($conn->option("host")); + warn "no ZOOM-C level events queued by $this" + if $conn->is_idle(); $this->set_options(); } diff --git a/lib/ZOOM/IRSpy/Task/Retrieve.pm b/lib/ZOOM/IRSpy/Task/Retrieve.pm index e0ed1f4..095fe02 100644 --- a/lib/ZOOM/IRSpy/Task/Retrieve.pm +++ b/lib/ZOOM/IRSpy/Task/Retrieve.pm @@ -1,4 +1,4 @@ -# $Id: Retrieve.pm,v 1.2 2006-10-25 17:16:14 mike Exp $ +# $Id: Retrieve.pm,v 1.3 2006-11-02 16:11:44 mike Exp $ package ZOOM::IRSpy::Task::Retrieve; @@ -45,6 +45,8 @@ sub run { $this->irspy()->log("irspy_task", $conn->option("host"), " retrieving record $index0 from $rs"); $rs->records($index0, 1, 0); # requests record + warn "no ZOOM-C level events queued by $this" + if $conn->is_idle(); $this->set_options(); } diff --git a/lib/ZOOM/IRSpy/Task/Search.pm b/lib/ZOOM/IRSpy/Task/Search.pm index dacf9c8..de4389d 100644 --- a/lib/ZOOM/IRSpy/Task/Search.pm +++ b/lib/ZOOM/IRSpy/Task/Search.pm @@ -1,4 +1,4 @@ -# $Id: Search.pm,v 1.5 2006-10-25 13:36:47 mike Exp $ +# $Id: Search.pm,v 1.6 2006-11-02 16:11:44 mike Exp $ package ZOOM::IRSpy::Task::Search; @@ -43,6 +43,8 @@ sub run { $this->irspy()->log("irspy_task", $conn->option("host"), " searching for '$query'"); $this->{rs} = $conn->search_pqf($query); + warn "no ZOOM-C level events queued by $this" + if $conn->is_idle(); $this->set_options();