summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9cb8eb2)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@306
8392b6e1-25fa-0310-8288-
cc32f8e212ea
return strftime($t_fmt,localtime());
}
return strftime($t_fmt,localtime());
}
-sub signal {
- my($sig) = @_;
- if ($hest_db) {
- print "\nCaught a SIG$sig--syncing database and shutting down\n";
- $hest_db->sync();
- $hest_db->close();
- }
- exit(0);
-}
-
-$SIG{'INT'} = \&signal;
-$SIG{'QUIT'} = \&signal;
-
sub hest_update {
my ($host_id, $share_id, $num) = @_;
sub hest_update {
my ($host_id, $share_id, $num) = @_;
print " opening index $index_node_url";
if ($index_node_url) {
print " opening index $index_node_url";
if ($index_node_url) {
- $hest_node ||= Search::Estraier::Node->new($index_node_url);
- $hest_node->set_auth('admin', 'admin');
+ $hest_node ||= Search::Estraier::Node->new(
+ url => $index_node_url,
+ user => 'admin',
+ passwd => 'admin',
+ croak_on_error => 1,
+ );
print " via node URL";
} else {
die "don't know how to use Hyper Estraier Index $index_node_url";
print " via node URL";
} else {
die "don't know how to use Hyper Estraier Index $index_node_url";
if ($results == 0) {
print " - no new files\n";
if ($results == 0) {
print " - no new files\n";
} else {
print " - $results files: ";
}
} else {
print " - $results files: ";
}
my $uri = 'file:///' . $fid;
unless ($skip_check) {
my $uri = 'file:///' . $fid;
unless ($skip_check) {
- my $id = ($hest_db || $hest_node)->uri_to_id($uri);
- next unless ($id == -1);
+ my $id = $hest_node->uri_to_id($uri);
+ next if ($id && $id == -1);
}
# create a document object
}
# create a document object