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

Add command line option to fetch updates and exit afterwards #454

Merged
merged 1 commit into from
May 16, 2020

Conversation

Nakaner
Copy link
Contributor

@Nakaner Nakaner commented Apr 6, 2020

When doing Photon upgrades on a (master) host not serving requests but getting its database rsynced to remote hosts, it is pretty annoying that it is only visible in the logfile when an update is completed. Therefore, I propose to add a new option -nominatim-update which makes Photon start, apply updates from Nominatim and then exit.

Copy link
Collaborator

@lonvia lonvia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just some very minor style comments. Otherwise looks fine to merge from me.

@@ -20,6 +20,9 @@
@Parameter(names = "-nominatim-import", description = "import nominatim database into photon (this will delete previous index)")
private boolean nominatimImport = false;

@Parameter(names = "-nominatim-update", description = "fetch updates from nominatim database into photon and exit (this updates the index only without offering an API")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing bracket in the description.

esClient.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet();
final NominatimUpdater nominatimUpdater = setupNominatimUpdater(args, esClient);
nominatimUpdater.update();
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep with the style of the other ifs and do the return; instead of the else.

@lonvia lonvia merged commit 2f45740 into komoot:master May 16, 2020
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.

2 participants