Skip to content

Commit

Permalink
Merge #1253 from '1159-fixNameOfNewlyCreatedIndex' of https://github.…
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed May 4, 2021
2 parents c4d0a0a + 5caa61d commit 6c6564f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app/controllers/resources/Webhook.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class Webhook extends Controller {
private static final String INDEX_BASEDUMP_ALIAS_SUFFIX = "-staging";
private static final String UPDATE_NEWEST_INDEX = "exact";
private static final String CREATE_INDEX = "create";
private static final String CREATE_INDEX_NAME = INDEX_NAME + "-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd-kkmm"));
private static final String MORPH_FILENAME = "alma.xml";
// If null, create default values from Global settings
public static String clusterHost = null;
Expand Down Expand Up @@ -76,6 +75,7 @@ public static Result basedumpAlma(final String GIVEN_TOKEN) {
if (!GIVEN_TOKEN.equals(TOKEN)) {
return wrongToken(KIND, GIVEN_TOKEN);
}
String CREATE_INDEX_NAME = INDEX_NAME + "-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd-kkmm"));
if (AlmaMarcXml2lobidJsonEs.threadAlreadyStarted){
sendMail(KIND, false, "Couldn't created new index with name "+ CREATE_INDEX_NAME + " because an ETL process is already running. Try again later!");
return status(423, MSG_ALREADY_RUNNING);
Expand Down

0 comments on commit 6c6564f

Please sign in to comment.