From cddcc28b741beb9c11affa5f90cc1c473bc5046f Mon Sep 17 00:00:00 2001 From: io42630 Date: Sun, 14 Aug 2022 11:48:53 +0200 Subject: [PATCH] + minor fixes --- src/main/java/com/olexyn/ensync/Flow.java | 8 ++++---- src/main/resources/syncignore | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/olexyn/ensync/Flow.java b/src/main/java/com/olexyn/ensync/Flow.java index 887e60b..dcc4672 100644 --- a/src/main/java/com/olexyn/ensync/Flow.java +++ b/src/main/java/com/olexyn/ensync/Flow.java @@ -17,7 +17,7 @@ import java.util.stream.Collectors; public class Flow implements Runnable { - public static final long POLLING_PAUSE = 100; + public static final long POLLING_PAUSE = 1000; private final AtomicBoolean running = new AtomicBoolean(false); public void start() { @@ -63,7 +63,7 @@ public class Flow implements Runnable { * */ private void sync(SyncDirectory sDir) { - LogU.infoPlain("DO SYNC %s", sDir.directoryPath); + LogU.infoStart("SYNC %s", sDir.directoryPath); var listFileSystem = sDir.readFileSystem(); LogU.infoPlain("# FS: %s", listFileSystem.size()); var record = new Record(sDir.directoryPath); @@ -75,7 +75,7 @@ public class Flow implements Runnable { var mapModified = sDir.makeListOfLocallyModifiedFiles(listFileSystem, record); var setCreatedNames = TraceUtil.fileNameSet(mapCreated); - var setDeletedNames = TraceUtil.fileNameSet(mapCreated); + var setDeletedNames = TraceUtil.fileNameSet(mapDeleted); var setCreatedNamesNew = Tools.setMinus(setCreatedNames, setDeletedNames); var setDeletedNamesFinal = Tools.setMinus(setDeletedNames, setCreatedNames); @@ -92,7 +92,6 @@ public class Flow implements Runnable { LogU.infoPlain("# MODIFIED: %s", mapModified.size()); if (createdByMove == deletedByMove) { LogU.infoPlain("(created by mv == deleted by mv) -> EXECUTE OPS"); - LogU.infoPlain("RESULTS:"); var createResults = sDir.doCreateOpsOnOtherSDs(mapCreated); printResults(createResults); var deleteResults = sDir.doDeleteOpsOnOtherSDs(mapDeleted); @@ -103,6 +102,7 @@ public class Flow implements Runnable { } else { LogU.warnPlain("(created by mv != deleted by mv) -> ABORT"); } + LogU.infoEnd("SYNC %s", sDir.directoryPath); } private void printResults(Map> map) { diff --git a/src/main/resources/syncignore b/src/main/resources/syncignore index 943b6e6..8d03417 100644 --- a/src/main/resources/syncignore +++ b/src/main/resources/syncignore @@ -1,8 +1,7 @@ record.ensync -collection/backup collection/books collection/movies collection/music collection/software collection/tv -collection/youtube \ No newline at end of file +collection/youtube