Wochenende
This commit is contained in:
@@ -1,3 +1,42 @@
|
|||||||
|
# Probleme 10.122.106.179
|
||||||
|
- Bilder liegen teilw. nur als zip vor, z.B. 71263
|
||||||
|
Lösungsansatz Heuristik: wenn nur zip vorhanden und kleiner als Threshold, entpackt hochladen
|
||||||
|
https://stackoverflow.com/questions/9324933/what-is-a-good-java-library-to-zip-unzip-files
|
||||||
|
|
||||||
|
- Beispiel-Records:
|
||||||
|
Advertising Media CAP
|
||||||
|
MA-ID 00071048 OK
|
||||||
|
MA-ID 00070778 OK
|
||||||
|
MA-ID 00070746 OK
|
||||||
|
|
||||||
|
Advertising Media FAP
|
||||||
|
MA-ID 00070142 OK
|
||||||
|
MA-ID 00070361
|
||||||
|
MA-ID 00063924
|
||||||
|
|
||||||
|
Images
|
||||||
|
MA-ID 00071263 OK
|
||||||
|
MA-ID 00063201
|
||||||
|
MA-ID 00056942
|
||||||
|
MA-ID 00057641
|
||||||
|
|
||||||
|
Videos (mit allen Downloadmöglichkeiten)
|
||||||
|
MA-ID 00070745
|
||||||
|
MA-ID 00070440
|
||||||
|
MA-ID 00070340
|
||||||
|
|
||||||
|
Guidelines
|
||||||
|
MA-ID 00070288
|
||||||
|
MA-ID 00071725 OK
|
||||||
|
|
||||||
|
- PROD: Problem mit Campaigns:
|
||||||
|
2017-11-03 11:17:26 ERROR- Could not create campaign year '2017' for entry 72048: 500
|
||||||
|
2017-11-03 11:17:26 ERROR- {"exceptionMessage":"The object cannot be saved because it already exists.","exceptionType":"Adam.Core.ItemAlreadyExistsException"}
|
||||||
|
2017-11-03 11:17:26 INFO - Create campaign 2017/2017 - Ecto Book
|
||||||
|
|
||||||
|
- Selections
|
||||||
|
|
||||||
|
|
||||||
# 2017-10-27
|
# 2017-10-27
|
||||||
- Vermerke im Excel nachziehen [erledigt]
|
- Vermerke im Excel nachziehen [erledigt]
|
||||||
- Brand Baytril existiert für CAP und FAP!! [erledigt]
|
- Brand Baytril existiert für CAP und FAP!! [erledigt]
|
||||||
@@ -20,7 +59,6 @@
|
|||||||
- s. Excel
|
- s. Excel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1. Status
|
1. Status
|
||||||
- Übertragen der Datensätze funktioniert grundsätzlich
|
- Übertragen der Datensätze funktioniert grundsätzlich
|
||||||
- MAM -> JSON (komme darauf zurück) -> eDAM
|
- MAM -> JSON (komme darauf zurück) -> eDAM
|
||||||
|
|||||||
@@ -43,6 +43,11 @@
|
|||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.5</version>
|
<version>2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.lingala.zip4j</groupId>
|
||||||
|
<artifactId>zip4j</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
logging.level.com.bayer=DEBUG
|
logging.level.com.bayer=DEBUG
|
||||||
#logging.level.com.bayer.edam.migration.interceptors=INFO
|
#logging.level.com.bayer.edam.migration.interceptors=INFO
|
||||||
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level- %msg%n
|
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level- %msg%n
|
||||||
logging.file=test.log
|
logging.file=application-WEEKEND.log
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ public class Definitions {
|
|||||||
//
|
//
|
||||||
// public static final String defaultLanguage = "c2bd4f9bbb954bcb80c31e924c9c26dc"; // /System/Languages/English
|
// public static final String defaultLanguage = "c2bd4f9bbb954bcb80c31e924c9c26dc"; // /System/Languages/English
|
||||||
// public static final String defaultProjectLead = "99ca421d2f7a4aea8096a81f00bd177c"; // InterfaceUserAH
|
// public static final String defaultProjectLead = "99ca421d2f7a4aea8096a81f00bd177c"; // InterfaceUserAH
|
||||||
// public static final String defaultLicenseHolder = ""; // Bayer Animal Health GmbH // TODO
|
// public static final String defaultLicenseHolder = "81c13edeb06f44aab672a747007fe56b"; // Bayer Animal Health GmbH
|
||||||
// public static final String defaultAdditionalPermittedUse = ""; // N/A // TODO
|
// public static final String defaultAdditionalPermittedUse = "30a04c1dbb24486f823ea73e00dbab92"; // N/A
|
||||||
//
|
//
|
||||||
// public static final String campaignRoot = "8fb6a504e2824ba9858aa7970078cb88";
|
// public static final String campaignRoot = "8fb6a504e2824ba9858aa7970078cb88";
|
||||||
|
|
||||||
@@ -48,6 +48,8 @@ public class Definitions {
|
|||||||
fieldIDs = new HashMap<String, String>();
|
fieldIDs = new HashMap<String, String>();
|
||||||
users = new HashMap<String, String>();
|
users = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
// QA values
|
||||||
classifications.put("Migration", new WriteClassification("2bd24882-b7d8-4d30-8e6f-a7ef00eb33e7", 1));
|
classifications.put("Migration", new WriteClassification("2bd24882-b7d8-4d30-8e6f-a7ef00eb33e7", 1));
|
||||||
classifications.put("Migration.Logos", new WriteClassification("de96f8db1de44cc6841ba81c00b9db8e", 1));
|
classifications.put("Migration.Logos", new WriteClassification("de96f8db1de44cc6841ba81c00b9db8e", 1));
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
private static final Logger log = LoggerFactory.getLogger(MamMigrationSelective.class);
|
private static final Logger log = LoggerFactory.getLogger(MamMigrationSelective.class);
|
||||||
|
|
||||||
static final String mamHost = "https://service.media-assistant.animalhealth.bayer.com";
|
static final String mamHost = "https://service.media-assistant.animalhealth.bayer.com";
|
||||||
private List<Integer> entrySelection = new ArrayList<Integer>(Arrays.asList( 48147 /* 58443/*, 53787, 32427, 71725, 63080*/ )); // 72048, 60984
|
private List<Integer> entrySelection = new ArrayList<Integer>(Arrays.asList( 72048, 60984 /*48147 /* 58443/*, 53787, 32427, 71725, 63080*/ )); // 72048, 60984
|
||||||
|
|
||||||
static final String categoryJson = "resources/2017-10-19_categories.json";
|
static final String categoryJson = "resources/2017-10-19_categories.json";
|
||||||
static final String categoryMapping = "resources/Media_Assistant_Categories_131017_EDITED_without_archive.csv";
|
static final String categoryMapping = "resources/Media_Assistant_Categories_131017_EDITED_without_archive.csv";
|
||||||
@@ -90,7 +90,7 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
public void run(String... strings) throws Exception {
|
public void run(String... strings) throws Exception {
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
// readEntryIDsFromFile();
|
readEntryIDsFromFile();
|
||||||
|
|
||||||
log.info("Write log headers for " + entryLog.getAbsolutePath());
|
log.info("Write log headers for " + entryLog.getAbsolutePath());
|
||||||
FileUtils.writeStringToFile(entryLog, "entryId" + fieldSeparator + "Location" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
FileUtils.writeStringToFile(entryLog, "entryId" + fieldSeparator + "Location" + fieldSeparator + "Entry" + lineSeparator, Charset.forName("utf-8"));
|
||||||
@@ -127,8 +127,8 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
// if needed start from a certain ID
|
// if needed start from a certain ID
|
||||||
// if (id > 32954)
|
if (id >= 32935)
|
||||||
// continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
log.info("GET entry " + id);
|
log.info("GET entry " + id);
|
||||||
@@ -437,16 +437,16 @@ public class MamMigrationSelective implements CommandLineRunner {
|
|||||||
HttpEntity<UploadRecord> httpEntity = new HttpEntity<UploadRecord>(record, adamHeaders);
|
HttpEntity<UploadRecord> httpEntity = new HttpEntity<UploadRecord>(record, adamHeaders);
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// URI location = restTemplate.postForLocation(Definitions.adamHost + "/records", httpEntity, UploadRecord.class);
|
URI location = restTemplate.postForLocation(Definitions.adamHost + "/records", httpEntity, UploadRecord.class);
|
||||||
// log.info("RESULT Entry " + entry.id + " migrated to record " + location);
|
log.info("RESULT Entry " + entry.id + " migrated to record " + location);
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
uploadFilesForEntry(entry);
|
// uploadFilesForEntry(entry);
|
||||||
|
|
||||||
// TODO process file upload errors
|
// TODO process file upload errors
|
||||||
|
|
||||||
// FileUtils.writeStringToFile(entryLog, entry.id + fieldSeparator + location.toString() + fieldSeparator + entryJson + lineSeparator,
|
FileUtils.writeStringToFile(entryLog, entry.id + fieldSeparator + location.toString() + fieldSeparator + entryJson + lineSeparator,
|
||||||
// Charset.forName("utf-8"), true);
|
Charset.forName("utf-8"), true);
|
||||||
}
|
}
|
||||||
catch (HttpStatusCodeException hsce) {
|
catch (HttpStatusCodeException hsce) {
|
||||||
log.error("RESULT Skipping entry " + entry.id + ": Error while creating record " + hsce.getStatusCode().toString());
|
log.error("RESULT Skipping entry " + entry.id + ": Error while creating record " + hsce.getStatusCode().toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user