minor cleanup on summary load
This commit is contained in:
parent
4a33f1267a
commit
eaeb1c5587
1 changed files with 9 additions and 13 deletions
|
|
@ -325,19 +325,15 @@ pub fn loadPortfolioPrices(
|
|||
symbol_progress.callback(),
|
||||
);
|
||||
|
||||
// Print summary
|
||||
const total = symbol_progress.grand_total;
|
||||
const from_cache = result.cached_count;
|
||||
const from_server = result.server_synced_count;
|
||||
const from_provider = result.provider_fetched_count;
|
||||
const failed = result.failed_count;
|
||||
const stale = result.stale_count;
|
||||
|
||||
if (from_cache == total) {
|
||||
printLoadSummary(io, color, .{ .total = total, .from_cache = from_cache, .from_server = from_server, .from_provider = from_provider, .failed = failed, .stale = stale });
|
||||
} else {
|
||||
printLoadSummary(io, color, .{ .total = total, .from_cache = from_cache, .from_server = from_server, .from_provider = from_provider, .failed = failed, .stale = stale });
|
||||
}
|
||||
// `printLoadSummaryImpl` picks the wording (all cached, some failed, ...).
|
||||
printLoadSummary(io, color, .{
|
||||
.total = symbol_progress.grand_total,
|
||||
.from_cache = result.cached_count,
|
||||
.from_server = result.server_synced_count,
|
||||
.from_provider = result.provider_fetched_count,
|
||||
.failed = result.failed_count,
|
||||
.stale = result.stale_count,
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue