mirror of
https://github.com/Qortal/qortal.git
synced 2025-06-07 08:46:58 +00:00
Fixed issue causing startup of various components to be delayed by 30 seconds.
This commit is contained in:
parent
1bb8f1b6d2
commit
a9721bab3d
@ -133,17 +133,10 @@ public class OnlineAccountsManager {
|
|||||||
// Process import queue
|
// Process import queue
|
||||||
executor.scheduleWithFixedDelay(this::processOnlineAccountsImportQueue, ONLINE_ACCOUNTS_QUEUE_INTERVAL, ONLINE_ACCOUNTS_QUEUE_INTERVAL, TimeUnit.MILLISECONDS);
|
executor.scheduleWithFixedDelay(this::processOnlineAccountsImportQueue, ONLINE_ACCOUNTS_QUEUE_INTERVAL, ONLINE_ACCOUNTS_QUEUE_INTERVAL, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
// Sleep for some time before scheduling sendOurOnlineAccountsInfo()
|
// Send our online accounts (using increased initial delay)
|
||||||
// This allows some time for initial online account lists to be retrieved, and
|
// This allows some time for initial online account lists to be retrieved, and
|
||||||
// reduces the chances of the same nonce being computed twice
|
// reduces the chances of the same nonce being computed twice
|
||||||
try {
|
executor.scheduleAtFixedRate(this::sendOurOnlineAccountsInfo, INITIAL_SLEEP_INTERVAL, ONLINE_ACCOUNTS_COMPUTE_INTERVAL, TimeUnit.MILLISECONDS);
|
||||||
Thread.sleep(INITIAL_SLEEP_INTERVAL);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send our online accounts
|
|
||||||
executor.scheduleAtFixedRate(this::sendOurOnlineAccountsInfo, ONLINE_ACCOUNTS_COMPUTE_INTERVAL, ONLINE_ACCOUNTS_COMPUTE_INTERVAL, TimeUnit.MILLISECONDS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user