Skip to content

Commit

Permalink
also only sleep when reigstering in this call
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed Jul 19, 2023
1 parent dc5d000 commit d9f8e8a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/java/edu/harvard/iq/dataverse/api/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,11 @@ public Response registerDataFilesInCollection(@Context ContainerRequestContext c
if (countSuccesses % 100 == 0) {
logger.info(countSuccesses + " out of " + count + " files registered successfully. " + new Date());
}
try {
Thread.sleep(sleepInterval * 1000);
} catch (InterruptedException ie) {
logger.warning("Interrupted Exception when attempting to execute Thread.sleep()!");
}
} else {
countDrafts++;
logger.fine(countDrafts + " out of " + count + " files not yet published");
Expand All @@ -1660,12 +1665,6 @@ public Response registerDataFilesInCollection(@Context ContainerRequestContext c
} catch (Exception e) {
logger.info("Unexpected Exception: " + e.getMessage());
}

try {
Thread.sleep(sleepInterval * 1000);
} catch (InterruptedException ie) {
logger.warning("Interrupted Exception when attempting to execute Thread.sleep()!");
}
}

logger.info(countAlreadyRegistered + " out of " + count + " files were already registered. " + new Date());
Expand Down

0 comments on commit d9f8e8a

Please sign in to comment.