Fix exit of ETL on exception (#964)

Fixes #708
This commit is contained in:
Alex Kremer
2023-11-01 11:59:19 +00:00
committed by GitHub
parent 5145d07693
commit 058df4d12a

View File

@@ -131,7 +131,7 @@ ETLService::monitor()
LOG(log_.debug()) << "Database is populated. "
<< "Starting monitor loop. sequence = " << nextSequence;
while (true) {
while (not isStopping()) {
nextSequence = publishNextSequence(nextSequence);
}
}
@@ -199,7 +199,7 @@ ETLService::monitorReadOnly()
cacheLoader_.load(latestSequence);
latestSequence++;
while (true) {
while (not isStopping()) {
if (auto rng = backend_->hardFetchLedgerRangeNoThrow(); rng && rng->maxSequence >= latestSequence) {
ledgerPublisher_.publish(latestSequence, {});
latestSequence = latestSequence + 1;