Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUTCH-3103] Fixed custom max intervals for AdaptiveFetchSchedule #848

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martin-djukanovic
Copy link

  1. The loop in setHostSpecificIntervals is cleaned up and if max interval in the config is set to default, it is treated correctly.
  2. The functions getMinInterval and getMaxInterval are respectively renamed to getCustomMinInterval and getCustomMaxInterval and now return null if no custom interval has been set for the given URL's hostname. If one of them returns null after it is called, then the corresponding default value will be used to bound the calculated interval.
  3. The custom interval values in the config are now allowed to equal the default values. For example, if the default min interval is 7200 then in the config file "0", "default" and "7200" are all valid values for the custom min interval, and they all have the same result.
  4. The config file template is changed to account for these changes.

1) The loop in setHostSpecificIntervals is cleaned up and if max
interval in the config is set to default, it is treated correctly.
2) The functions getMinInterval and getMaxInterval are respectively
renamed to getCustomMinInterval and getCustomMaxInterval and now return
null if no custom interval has been set for the given URL's hostname. If
one of them returns null after it is called, then the corresponding
default value will be used to bound the calculated interval.
3) The custom interval values in the config are now allowed to equal the
default values. For example, if the default min interval is 7200 then in
the config file "0", "default" and "7200" are all valid values for the
custom min interval, and they all have the same result.
4) The config file template is changed to account for these changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant