Service reloading manually and automatically
Tom Zeller
tzeller at dragonacea.biz
Thu May 25 18:57:06 EDT 2017
Hi Rod,
Not a big deal, but I just noticed that a reloadable service will
still reload itself even if it was reloaded manually (via
bin/reload-service.sh).
Steps to reproduce :
update the reloadable service's config resource
manually reload (bin/reload-service.sh)
wait (for as long as the service's checkInterval) and watch it reload
I looked at the reloadable code, and I guess I was expecting
ServiceableComponent to provide ReloadableService's
getLastSuccessfulReloadInstant() or similar so that
ReloadableSpringService could check to see if the Service was reloaded
recently enough (maybe meaning more recently than the resources last
modification time).
Perhaps as a corollary and being picky, after the service's resource
is modified, if the service reloads itself before the manual reload, I
guess the manual reload could return something like "already reloaded"
rather than reloading again. Is that the right thing ? dunno, probably
not.
Whether or not anything here is worth changing, I imagine it would be
a v4 thing because of changes to interfaces.
Tom
More information about the dev
mailing list