Skip to content

Commit 3703faf

Browse files
committed
Align this with the progress reporter frequency
1 parent d0450a8 commit 3703faf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/launchableinc/ingest/commits/CommitGraphCollector.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public class CommitGraphCollector {
7676
*/
7777
static final String HEADER_FILE = ".launchable";
7878
private static final String APPLICATION_JSON = "application/json";
79+
private static final int PROGRESS_REPORT_INTERVAL = 3000;
7980

8081
private final String rootName;
8182

@@ -103,7 +104,7 @@ public class CommitGraphCollector {
103104
/**
104105
* Reports the # of file transfers, which is the most time-consuming part.
105106
*/
106-
private final ProgressReporter fileTransferProgressReporter = new ProgressReporter(Duration.ofSeconds(3));
107+
private final ProgressReporter fileTransferProgressReporter = new ProgressReporter(Duration.ofMillis(PROGRESS_REPORT_INTERVAL));
107108

108109

109110
private String dryRunPrefix() {
@@ -236,7 +237,7 @@ private void sendFiles(URL service, LaunchableHttpClient client, ContentProducer
236237
int filesProcessed = 0;
237238
while (true) {
238239
try {
239-
Thread.sleep(5000);
240+
Thread.sleep(PROGRESS_REPORT_INTERVAL);
240241
} catch (InterruptedException e) {
241242
// not expecting this to happen, sufficient to fail
242243
throw new IOException();

0 commit comments

Comments
 (0)