-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add support for automatically updating capabilities of WMS layers #130
Add support for automatically updating capabilities of WMS layers #130
Conversation
…rseWMTSCapabilities(String) logic to calling function, did not improve readability
…UpdateCapabilitiesJob accordingly
protected static boolean shouldUpdate(OskariLayer layer) { | ||
Date lastUpdated = layer.getCapabilitiesLastUpdated(); | ||
if (lastUpdated == null) { | ||
LOG.debug("Should update layer:", layer.getId(), "last updated unknown and update rate is positive"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update rate isn't checked here, but I guess if last update is null we should always update. Maybe change the message a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, the message is a bit misleading, update rate value is just known to be positive because we only requested such layers by calling layerService.findAllWithPositiveUpdateRateSec(). However since that is just known we can just remove that part from the message.
#86 added possibility to automatically update capabilities of WMTS layers. This PR improves the work done in #86 by adding support for WMS layers. Pulling the information out of WMS Capabilities documents (for both WMS versions 1.1.1 and 1.3.0) is refactored (rewritten).
Also adds possibility to set different update frequency for each and every layer. The update rate is configured via
oskari_maplayer.capabilities_update_rate_sec
which defaults to 0 (never) making this even more of an opt-in feature.