projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import isodate() from Utils.pm
[irspy-moved-to-github.git]
/
lib
/
ZOOM
/
IRSpy
/
Test
/
Search
/
Bib1.pm
diff --git
a/lib/ZOOM/IRSpy/Test/Search/Bib1.pm
b/lib/ZOOM/IRSpy/Test/Search/Bib1.pm
index
a84fcd5
..
1b51773
100644
(file)
--- a/
lib/ZOOM/IRSpy/Test/Search/Bib1.pm
+++ b/
lib/ZOOM/IRSpy/Test/Search/Bib1.pm
@@
-1,4
+1,4
@@
-# $Id: Bib1.pm,v 1.10 2006-10-13 10:34:34 sondberg Exp $
+# $Id: Bib1.pm,v 1.14 2006-10-27 09:56:07 sondberg Exp $
# See the "Main" test package for documentation
# See the "Main" test package for documentation
@@
-23,7
+23,7
@@
sub start {
foreach my $attr (@attrs) {
$conn->irspy_search_pqf("\@attr 1=$attr mineral",
foreach my $attr (@attrs) {
$conn->irspy_search_pqf("\@attr 1=$attr mineral",
- {'attr' => $attr},
+ {'attr' => $attr}, {},
ZOOM::Event::RECV_SEARCH, \&found,
exception => \&error);
}
ZOOM::Event::RECV_SEARCH, \&found,
exception => \&error);
}
@@
-37,10
+37,7
@@
sub found {
$conn->log("irspy_test", "search on access-point $attr found $n record",
$n==1 ? "" : "s");
$conn->log("irspy_test", "search on access-point $attr found $n record",
$n==1 ? "" : "s");
- $conn->record()->append_entry("irspy:status",
- "<irspy:search set='bib1' ap='$attr' ok='1'>".
- isodate(time()) .
- "</irspy:search>");
+ update($conn, $attr, 1);
return ZOOM::IRSpy::Status::TASK_DONE;
}
return ZOOM::IRSpy::Status::TASK_DONE;
}
@@
-52,12
+49,18
@@
sub error {
$conn->log("irspy_test", "search on access-point $attr had error: ",
$exception);
$conn->log("irspy_test", "search on access-point $attr had error: ",
$exception);
- $conn->record()->append_entry("irspy:status",
- "<irspy:search set='bib1' ap='$attr' ok='0'>".
- isodate(time()) .
- "</irspy:search>");
+ update($conn, $attr, 0);
+
return ZOOM::IRSpy::Status::TASK_DONE;
}
return ZOOM::IRSpy::Status::TASK_DONE;
}
+sub update {
+ my ($conn, $attr, $ok) = @_;
+ $conn->record()->store_result('search', 'set' => 'bib-1',
+ 'ap' => $attr,
+ 'ok' => $ok);
+}
+
+
1;
1;