mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-11-30 16:36:36 -05:00
schedule to publish trade stats within 12 hours after restart (#1955)
This commit is contained in:
parent
1a911fdb9d
commit
46ccb9b925
1 changed files with 2 additions and 2 deletions
|
|
@ -302,12 +302,12 @@ public class TradeStatisticsManager {
|
|||
return;
|
||||
}
|
||||
|
||||
// publish after random delay within 24 hours
|
||||
// publish after random delay within 12 hours
|
||||
log.info("Scheduling to publish trade statistics at random time for {} {}", trade.getClass().getSimpleName(), trade.getShortId());
|
||||
TradeStatistics3 tradeStatistics3V2Final = tradeStatistics3V2;
|
||||
UserThread.runAfterRandomDelay(() -> {
|
||||
p2PService.addPersistableNetworkPayload(tradeStatistics3V2Final, true);
|
||||
}, 0, PUBLISH_STATS_RANDOM_DELAY_HOURS * 60 * 60 * 1000, TimeUnit.MILLISECONDS);
|
||||
}, 0, PUBLISH_STATS_RANDOM_DELAY_HOURS / 2 * 60 * 60 * 1000, TimeUnit.MILLISECONDS);
|
||||
});
|
||||
log.info("maybeRepublishTradeStatistics took {} ms. Number of tradeStatistics: {}. Number of own trades: {}",
|
||||
System.currentTimeMillis() - ts, hashes.size(), trades.size());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue