forked from D-Net/dnet-hadoop
avoid to consider _SUCCESS file
This commit is contained in:
parent
1b0b968548
commit
c27f12d6e8
|
@ -62,6 +62,7 @@ public class SendToZenodo implements Serializable {
|
||||||
|
|
||||||
Path p = fileStatus.getPath();
|
Path p = fileStatus.getPath();
|
||||||
String p_string = p.toString();
|
String p_string = p.toString();
|
||||||
|
if(!p_string.endsWith("_SUCCESS")){
|
||||||
String tmp = p_string.substring(0, p_string.lastIndexOf("/"));
|
String tmp = p_string.substring(0, p_string.lastIndexOf("/"));
|
||||||
String community = tmp.substring(tmp.lastIndexOf("/") + 1);
|
String community = tmp.substring(tmp.lastIndexOf("/") + 1);
|
||||||
log.info("Sending information for community: " + community);
|
log.info("Sending information for community: " + community);
|
||||||
|
@ -72,11 +73,6 @@ public class SendToZenodo implements Serializable {
|
||||||
try {
|
try {
|
||||||
apiClient.upload(f, community_name);
|
apiClient.upload(f, community_name);
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
if (f.exists()) {
|
|
||||||
log.info("Deleting information for community: " + community);
|
|
||||||
f.delete();
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
if (f.exists()) {
|
if (f.exists()) {
|
||||||
log.info("Deleting information for community: " + community);
|
log.info("Deleting information for community: " + community);
|
||||||
|
@ -85,6 +81,8 @@ public class SendToZenodo implements Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
apiClient.sendMretadata(metadata);
|
apiClient.sendMretadata(metadata);
|
||||||
apiClient.publish();
|
apiClient.publish();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue