Timeout for resolver interactions user/artunit/resolver_plugin_timeout
authorArt Rhyno <artrhyno@uwindsor.ca>
Thu, 15 Dec 2011 01:13:30 +0000 (20:13 -0500)
committerArt Rhyno <artrhyno@uwindsor.ca>
Thu, 15 Dec 2011 01:13:30 +0000 (20:13 -0500)
commit8de4e0b29bc6a0ffbd00555a7c6b07cff1684146
treeca6ecf0426f54bf58b8686d4712ee21259ec565b
parentc4e56c4c40c6a69887834a2fd5d7d099c9987097
Timeout for resolver  interactions

These changes add some timeout options for using the resolver
setup. For example:

request open-ils.resolver open-ils.resolver.resolve_holdings "issn", "0013-0618", "http://sfx.scholarsportal.info/windsor", 10

where "10" is the number of seconds for a timeout. A default timeout can be
specified in the opensrf.xml file in the ResolverResolver section as well:

<lwp_timeout>30</lwp_timeout>

from TPAC, a request can be also include a timeout option:

[% IF openurl.enabled == 'true';
    FOR issn IN args.resolver_issns;
      resolver = ResolverResolver.resolve_issn(issn, openurl.baseurl,20);
          FOR res IN resolver;
%]

where "20" is the number of seconds for a timeout.

In working through this, I found some bugs in my resolver collection
code in misc_util.tt2 for isbns which I have addressed.
Open-ILS/src/perlmods/lib/OpenILS/Application/ResolverResolver.pm
Open-ILS/src/perlmods/lib/Template/Plugin/ResolverResolver.pm
Open-ILS/src/templates/opac/parts/misc_util.tt2