mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
publish ledgers closed in the last ten minutes
This commit is contained in:
@@ -701,15 +701,17 @@ ReportingETL::runETLPipeline(uint32_t startSequence, int numExtractors)
|
|||||||
.count();
|
.count();
|
||||||
auto closeTime = lgrInfo.closeTime.time_since_epoch().count();
|
auto closeTime = lgrInfo.closeTime.time_since_epoch().count();
|
||||||
auto age = now - (rippleEpochStart + closeTime);
|
auto age = now - (rippleEpochStart + closeTime);
|
||||||
// if the ledger closed over 10 seconds ago, assume we are still
|
// if the ledger closed over 10 minutes ago, assume we are still
|
||||||
// catching up and don't publish
|
// catching up and don't publish
|
||||||
if (age < 10)
|
if (age < 600)
|
||||||
{
|
|
||||||
boost::asio::post(
|
boost::asio::post(
|
||||||
publishStrand_, [this, lgrInfo = lgrInfo]() {
|
publishStrand_, [this, lgrInfo = lgrInfo]() {
|
||||||
publishLedger(lgrInfo);
|
publishLedger(lgrInfo);
|
||||||
});
|
});
|
||||||
}
|
else
|
||||||
|
BOOST_LOG_TRIVIAL(info)
|
||||||
|
<< "Skipping publishing old ledger. seq = "
|
||||||
|
<< lgrInfo.seq;
|
||||||
|
|
||||||
lastPublishedSequence = lgrInfo.seq;
|
lastPublishedSequence = lgrInfo.seq;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user