[open-ils-commits] [GIT] Evergreen ILS branch master updated. 6402ef9d74cb09a40dc964eca8511bd87723f919
Evergreen Git
git at git.evergreen-ils.org
Wed Sep 7 18:01:52 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 6402ef9d74cb09a40dc964eca8511bd87723f919 (commit)
from 3dbefee19e22677494d8812eb4803df57b4ed715 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6402ef9d74cb09a40dc964eca8511bd87723f919
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Wed Sep 7 16:15:20 2011 -0400
A/T reactor 'AstCall' can't have global CStoreEditor
It's not good for any Evergreen service to try to have a global
cstoreeditor instance. Scope it to the handler() sub that needs it, and
comment out the thus-far unused/unfinished retrieve() sub.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/AstCall.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/AstCall.pm
index e664da6..bddd7e7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/AstCall.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/AstCall.pm
@@ -14,8 +14,6 @@ $Data::Dumper::Indent = 0;
my $U = 'OpenILS::Application::AppUtils';
-my $e = new_editor(xact => 1);
-
# $last_channel_used is:
# ~ index (not literal value) of last channel used in a callfile
# ~ index is of position in @channels (zero-based)
@@ -114,6 +112,8 @@ sub rpc_client {
sub handler {
my ($self, $env) = @_;
+ my $e = new_editor(xact => 1);
+
$logger->info(__PACKAGE__ . ": entered handler");
# assignment, not comparison
@@ -297,64 +297,69 @@ sub cleanup {
}
sub retrieve {
- my $self = shift or return;
- my $client = rpc_client();
- my $resp = $client->send_request('retrieve');
- unless ($resp and ref $resp) {
- $logger->error(
- __PACKAGE__ . ": Mediator Error: " .
- ($resp ? 'Bad' : 'No') . " response to retrieve request"
- );
- return;
- }
-
- # my $count = $resp{match_count}; # how many files we should have
- # my @rm_list = ();
- my @files = _files($resp);
- foreach (@files) {
- my $content = $resp->{$_}->content;
- my $filename = $resp->{$_}->filename;
- unless ($content) {
- $logger->error(__PACKAGE__ .
- ": Mediator sent incomplete/unintelligible message for " .
- "filename " . ($filename || 'UNKNOWN'));
- next;
- }
- my $feedback = feedback_hash($content);
- my $output = $e->retrieve_action_trigger_event_output(
- $feedback->{event_output}
- );
- if ($content == $output->data) {
- $logger->error(
- __PACKAGE__ . ": Mediator sent duplicate file "
- . $resp->{$_}->filename . " for event_output " .
- $feedback->{event_output}
- );
- } else {
- $output->data($content);
- }
- $e->commit; # defer until after loop? probably not
- my $clean = $client->send_request('cleanup', $filename);
- # TODO: deletion by (comma-separated) filenames in chunks
- # instead of individually?
- # push @rm_list, $_; $client->send_request('cleanup', join(',', at rm_list));
- unless ($clean and ref $clean) {
- $logger->error(
- __PACKAGE__ . ": Mediator Error: " .
- ($clean ? 'Bad' : 'No') .
- " response to cleanup $filename request");
- next;
- }
- unless ($clean->{code}->value == 200 and $clean->{delete_count}) {
- $logger->error(__PACKAGE__ . ": cleanup $filename returned " . (
- $resp->{faultcode} ? $resp->{faultcode}->value :
- $resp->{ code} ? $resp->{ code}->value :
- " -- UNKNOWN response '$resp'"
- ) . " with delete_count " .
- (defined $clean->{delete_count} ? $clean->{delete_count} : 'UNDEF'));
- }
- }
- return @files;
+ $logger->info("retrieve() not implemented. how'd we get here?"); # XXX
+ return;
}
+#sub retrieve {
+# my $self = shift or return;
+# my $client = rpc_client();
+# my $resp = $client->send_request('retrieve');
+# unless ($resp and ref $resp) {
+# $logger->error(
+# __PACKAGE__ . ": Mediator Error: " .
+# ($resp ? 'Bad' : 'No') . " response to retrieve request"
+# );
+# return;
+# }
+#
+# # my $count = $resp{match_count}; # how many files we should have
+# # my @rm_list = ();
+# my @files = _files($resp);
+# foreach (@files) {
+# my $content = $resp->{$_}->content;
+# my $filename = $resp->{$_}->filename;
+# unless ($content) {
+# $logger->error(__PACKAGE__ .
+# ": Mediator sent incomplete/unintelligible message for " .
+# "filename " . ($filename || 'UNKNOWN'));
+# next;
+# }
+# my $feedback = feedback_hash($content);
+# my $output = $e->retrieve_action_trigger_event_output(
+# $feedback->{event_output}
+# );
+# if ($content == $output->data) {
+# $logger->error(
+# __PACKAGE__ . ": Mediator sent duplicate file "
+# . $resp->{$_}->filename . " for event_output " .
+# $feedback->{event_output}
+# );
+# } else {
+# $output->data($content);
+# }
+# $e->commit; # defer until after loop? probably not
+# my $clean = $client->send_request('cleanup', $filename);
+# # TODO: deletion by (comma-separated) filenames in chunks
+# # instead of individually?
+# # push @rm_list, $_; $client->send_request('cleanup', join(',', at rm_list));
+# unless ($clean and ref $clean) {
+# $logger->error(
+# __PACKAGE__ . ": Mediator Error: " .
+# ($clean ? 'Bad' : 'No') .
+# " response to cleanup $filename request");
+# next;
+# }
+# unless ($clean->{code}->value == 200 and $clean->{delete_count}) {
+# $logger->error(__PACKAGE__ . ": cleanup $filename returned " . (
+# $resp->{faultcode} ? $resp->{faultcode}->value :
+# $resp->{ code} ? $resp->{ code}->value :
+# " -- UNKNOWN response '$resp'"
+# ) . " with delete_count " .
+# (defined $clean->{delete_count} ? $clean->{delete_count} : 'UNDEF'));
+# }
+# }
+# return @files;
+#}
+
1;
-----------------------------------------------------------------------
Summary of changes:
.../OpenILS/Application/Trigger/Reactor/AstCall.pm | 125 ++++++++++----------
1 files changed, 65 insertions(+), 60 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list