Skip to content

Commit 9b3a246

Browse files
remove recovery
Co-authored-by: wow-such-code <[email protected]>
1 parent 62ed696 commit 9b3a246

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/main/java/life/qbic/registration/openbis/OpenBisDropboxETL.java

+2-12
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,14 @@ public void process(IDataSetRegistrationTransactionV2 transaction) {
7171
newDataSet.setPropertyValue(QPropertyType.Q_TASK_ID.getOpenBisPropertyName(), dataSetProvenance.taskId());
7272
QDatasetType qDatasetType = getDatasetType(measurementSample);
7373
newDataSet.setDataSetType(qDatasetType.name());
74-
moveFiles(transaction, newDataSet, provenanceFile);
75-
76-
}
77-
78-
private void moveFiles(IDataSetRegistrationTransactionV2 transactionV2, IDataSet dataSet, File provenanceFile) {
7974

8075
try {
81-
var buffer = Files.readAllBytes(provenanceFile.toPath().toAbsolutePath());
8276
Files.delete(provenanceFile.toPath());
83-
try {
84-
transactionV2.moveFile(transactionV2.getIncoming().getAbsolutePath(), dataSet);
85-
} catch (Exception e) {
86-
Files.write(provenanceFile.toPath().toAbsolutePath(), buffer);
87-
throw new RuntimeException(e);
88-
}
77+
transaction.moveFile(transaction.getIncoming().getAbsolutePath(), newDataSet);
8978
} catch (IOException e) {
9079
throw new RuntimeException(e);
9180
}
81+
9282
}
9383

9484
private static QDatasetType getDatasetType(ISampleImmutable measurementSample) {

0 commit comments

Comments
 (0)