From: Sweidan Omar Date: Tue, 18 Jan 2022 13:00:09 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=dd68ad24c5b5563eb011abc71f9bd226b9bf609e;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32759 --- diff --git a/server/-product/production/AMC/jobs/steps/PeableBeachMissingMaterialCheckerStep.java b/server/-product/production/AMC/jobs/steps/PeableBeachMissingMaterialCheckerStep.java index 3c78cf4a..7f38fe98 100644 --- a/server/-product/production/AMC/jobs/steps/PeableBeachMissingMaterialCheckerStep.java +++ b/server/-product/production/AMC/jobs/steps/PeableBeachMissingMaterialCheckerStep.java @@ -73,7 +73,8 @@ public class PeableBeachMissingMaterialCheckerStep extends JobStep { */ PBQuery query = new PBQuery(); - query.init(primaryEndPoint, primaryUserName, primaryPassword, secondaryEndPoint, secondaryUserName, secondaryPassword, rangeForwardHours); + query.init(primaryEndPoint, primaryUserName, primaryPassword, secondaryEndPoint, secondaryUserName, secondaryPassword, + rangeForwardHours); Collection medias = query.getPossibelMissingMaterialNames(new ArrayList<>(poolContent)); logger.info(getMarker(), "API returned {} items", medias == null ? 0 : medias.size()); @@ -199,8 +200,8 @@ public class PeableBeachMissingMaterialCheckerStep extends JobStep { Path outputPath = null; try { outputPath = Paths.get(escortStoreUri.toString(true)); - boolean exsists = statusFileExists(outputPath, fileName); - if (exsists) + boolean exists = statusFileExists(outputPath, fileName); + if (exists) return; EscortFiles.createMetadata(outputPath.toString(), escortFileName, downloadable.toPrettyString("")); logger.info(getMarker(), "Status file created {}", escortFileName); @@ -210,17 +211,17 @@ public class PeableBeachMissingMaterialCheckerStep extends JobStep { } private boolean statusFileExists(Path outputPath, String fileName) { - boolean exsists = false; + boolean exists = false; Path statusPath = Paths.get(outputPath.toString(), EscortFiles.STATUSFOLDER); try (DirectoryStream p = Files.newDirectoryStream(statusPath, "*" + fileName + EscortFiles.DOT_JSON)) { if (p.iterator().hasNext()) { logger.info(getMarker(), "Status file for {} already exists", fileName); - exsists = true; + exists = true; } } catch (Exception e1) { logger.error(getSessionMarker(), e1.getMessage()); } - return exsists; + return exists; } }