Give block archiver more time after started

This commit is contained in:
AlphaX-Reloaded 2024-11-06 16:04:36 +01:00
parent 56db39e190
commit 3f2fc5c6a2

View File

@ -21,7 +21,7 @@ public class BlockArchiver implements Runnable {
private static final Logger LOGGER = LogManager.getLogger(BlockArchiver.class); private static final Logger LOGGER = LogManager.getLogger(BlockArchiver.class);
private static final long INITIAL_SLEEP_PERIOD = 5 * 60 * 1000L + 1234L; // ms private static final long INITIAL_SLEEP_PERIOD = 15 * 60 * 1000L; // ms
public void run() { public void run() {
Thread.currentThread().setName("Block archiver"); Thread.currentThread().setName("Block archiver");
@ -91,7 +91,7 @@ public class BlockArchiver implements Runnable {
// We didn't reach our file size target, so that must mean that we don't have enough blocks // We didn't reach our file size target, so that must mean that we don't have enough blocks
// yet or something went wrong. Sleep for a while and then try again. // yet or something went wrong. Sleep for a while and then try again.
repository.discardChanges(); repository.discardChanges();
Thread.sleep(60 * 60 * 1000L); // 1 hour Thread.sleep(2 * 60 * 60 * 1000L); // 2 hour around 100 blocks
break; break;
case BLOCK_NOT_FOUND: case BLOCK_NOT_FOUND: