Commit 4879cdc2 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Fix a few paths for cleaning up.

parent bddc73ce
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -178,9 +178,11 @@ public class BridgedbMetricsProcessor extends CollecTorMain {
   * in the last three days (seven weeks).
   */
  private void cleanUpDirectories() {
    PersistenceUtils.cleanDirectory(Paths.get(this.recentPathName),
    PersistenceUtils.cleanDirectory(
        Paths.get(this.recentPathName).resolve("bridgedb-metrics"),
        Instant.now().minus(3, ChronoUnit.DAYS).toEpochMilli());
    PersistenceUtils.cleanDirectory(Paths.get(this.outputPathName),
    PersistenceUtils.cleanDirectory(
        Paths.get(this.outputPathName).resolve("bridgedb-metrics"),
        Instant.now().minus(49, ChronoUnit.DAYS).toEpochMilli());
  }
}
+4 −2
Original line number Diff line number Diff line
@@ -449,9 +449,11 @@ public class SanitizedBridgesWriter extends CollecTorMain {
   * in the last three days (seven weeks), and remove the .tmp extension from
   * newly written files. */
  private void cleanUpDirectories() {
    PersistenceUtils.cleanDirectory(this.recentDirectory,
    PersistenceUtils.cleanDirectory(
        this.recentDirectory.resolve("bridge-descriptors"),
        Instant.now().minus(3, ChronoUnit.DAYS).toEpochMilli());
    PersistenceUtils.cleanDirectory(this.outputDirectory,
    PersistenceUtils.cleanDirectory(
        this.outputDirectory.resolve("bridge-descriptors"),
        Instant.now().minus(49, ChronoUnit.DAYS).toEpochMilli());
  }
}
+4 −2
Original line number Diff line number Diff line
@@ -156,9 +156,11 @@ public class SnowflakeStatsDownloader extends CollecTorMain {
  /** Delete all files from the rsync (out) directory that have not been
   * modified in the last three days (seven weeks). */
  private void cleanUpDirectories() {
    PersistenceUtils.cleanDirectory(Paths.get(this.recentPathName),
    PersistenceUtils.cleanDirectory(
        Paths.get(this.recentPathName, "snowflakes"),
        Instant.now().minus(3, ChronoUnit.DAYS).toEpochMilli());
    PersistenceUtils.cleanDirectory(Paths.get(this.outputPathName),
    PersistenceUtils.cleanDirectory(
        Paths.get(this.outputPathName, "snowflakes"),
        Instant.now().minus(49, ChronoUnit.DAYS).toEpochMilli());
  }
}