Skip to content

Commit 6a1293e

Browse files
committed
don’t recurse forever.
1 parent 3d874e9 commit 6a1293e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/lowtuna/jsonblob/core/BlobCleanupProducer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class BlobCleanupProducer extends DirectoryWalker<Void> implements Runnab
2727
private final BlockingQueue<File> filesToProcess;
2828

2929
public BlobCleanupProducer(Path dataDirectoryPath, Duration blobAccessTtl, BlockingQueue<File> filesToProcess, MetricRegistry metricRegistry) {
30+
super(null, 3);
3031
this.dataDirectoryPath = dataDirectoryPath;
3132
this.blobAccessTtl = blobAccessTtl;
3233
this.filesToProcess = filesToProcess;
@@ -57,6 +58,8 @@ protected boolean handleDirectory(File directory, int depth, Collection<Void> re
5758
}
5859
});
5960

61+
log.info("Processed {} blobs in {}", fileCount.get(), directory.getAbsolutePath());
62+
6063
if (fileCount.get() == 0) {
6164
log.info("{} has no files, so it's being deleted", directory.getAbsolutePath());
6265
} else if (fileCount.get() == 1) {

0 commit comments

Comments
 (0)