Geo::Coder::Many::Scheduler::Selective - Scheduler that times out bad geocoders
This scheduler wraps another scheduler, and provides facilities for disabling various geocoders based on external feedback (e.g. limit exceeded messages)
In particular, if a geocoder returns an error, it is disabled for a timeout period. This period increases exponentially upon each successive consecutive failure.
Constructs and returns an instance of the class. Takes a reference to an array of {name, weight} hashrefs, and the name of a scheduler class to wrap (e.g. Geo::Coder::Many::Scheduler::OrderedList)
Wrapper method - passes the reset on to the wrapped scheduler.
Retrieves the next geocoder from the internal scheduler, but skipping over it if it isn't acceptable (e.g. being timed out)
Returns undef if there are no more geocoders that will become available. Otherwise it returns the time remaining until the earliest timeout-end arrives.
Recieves feedback about geocoders, and sets/clears timeouts appropriately.
Increases the timeout for the specified geocoder, according to the base_timeout and timeout_multiplier instance variables.
Clears the timeout for the specified geocoder.
To install Geo::Coder::Many, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Coder::Many
CPAN shell
perl -MCPAN -e shell install Geo::Coder::Many
For more information on module installation, please visit the detailed CPAN module installation guide.