Campaign fix for PROD

This commit is contained in:
gexce
2017-11-10 09:50:27 +01:00
parent ddb7697e55
commit e53745e72c
4 changed files with 324 additions and 311 deletions
@@ -333,9 +333,12 @@ public class MamMigrationSelective implements CommandLineRunner {
// retrieve the newly created classification back
yearClassification = restTemplate.exchange(Definitions.adamHost + "/classification/" + newYear.guid, HttpMethod.GET, adamHeadersEntity, Classification.class).getBody();
campaignYears.add(yearClassification);
log.debug("New campaign year " + campaignYear + " created: " + yearClassification.id);
} catch (HttpStatusCodeException hsce) {
log.error("Could not create campaign year '" + campaignYear + "' for entry " + entry.id + ": " + hsce.getStatusCode().toString());
log.error(hsce.getResponseBodyAsString());
hsce.printStackTrace();
}
}
@@ -370,6 +373,7 @@ public class MamMigrationSelective implements CommandLineRunner {
catch (HttpStatusCodeException hsce) {
log.error("Could not create campaign '" + campaignName + "' for entry " + entry.id + ": " + hsce.getStatusCode().toString());
log.error(hsce.getResponseBodyAsString());
hsce.printStackTrace();
}
}
} catch (NumberFormatException nfe) {