Timeout for resolver interactions
authorArt Rhyno <artrhyno@uwindsor.ca>
Thu, 15 Dec 2011 01:13:30 +0000 (20:13 -0500)
committerDan Scott <dscott@laurentian.ca>
Thu, 22 Dec 2011 22:47:23 +0000 (17:47 -0500)
commit32a7a116784cc03cc69cd8327875810a39052db4
tree219696853b09ca322881f32963b88c6931b9a501
parent91c31e5eb7e1afcca2f020770c89bc3776696b11
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.

Signed-off-by: Art Rhyno <artrhyno@uwindsor.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
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