Skip to content

Commit

Permalink
Use only database access in class DataCopyrule
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Jan 25, 2024
1 parent ac18595 commit 731b24f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.kitodo.api.MetadataEntry;
import org.kitodo.api.dataformat.LogicalDivision;
import org.kitodo.api.dataformat.Workpiece;
import org.kitodo.data.elasticsearch.exceptions.CustomResponseException;
import org.kitodo.data.exceptions.DataException;
import org.kitodo.production.services.ServiceManager;

Expand Down Expand Up @@ -56,8 +55,8 @@ public void apply(CopierData data) {
try (OutputStream out = ServiceManager.getFileService()
.write(ServiceManager.getFileService().getMetadataFilePath(data.getProcess()))) {
ServiceManager.getMetsService().save(workpiece, out);
ServiceManager.getProcessService().saveToIndex(data.getProcess(), false);
} catch (IOException | CustomResponseException | DataException e) {
ServiceManager.getProcessService().save(data.getProcess(), false);
} catch (IOException | DataException e) {
logger.error("Exception while saving Metadata file", e, e.getMessage());
}
}
Expand Down

0 comments on commit 731b24f

Please sign in to comment.