String database = InjectHelper.instanceWithName(String.class, "org.socialmusicdiscovery.server.database");
String forcedUpdateOfSearchRelations = System.getProperty("org.socialmusicdiscovery.server.searchrelations");
if ((database != null && (database.endsWith("-test"))) || (forcedUpdateOfSearchRelations != null && forcedUpdateOfSearchRelations.equalsIgnoreCase("true"))) {
System.out.println("Starting to update search relations...");
SearchRelationPostProcessor searchRelationPostProcessor = new SearchRelationPostProcessor();
try {
searchRelationPostProcessor.init(null);
} catch (InitializationFailedException e) {
// // searchRelationPostProcessor initialization doesn't throw initialization failed
e.printStackTrace();
}
searchRelationPostProcessor.execute(new ProcessingStatusCallback() {
public void progress(String module, String currentDescription, Long currentNo, Long totalNo) {
System.out.println(currentNo + " of " + totalNo + ": " + currentDescription);
}
public void failed(String module, String error) {