This commit is contained in:
Scott E. Graves 2025-02-21 08:53:31 -06:00
parent 3f5756f01c
commit f90070139d

View File

@ -146,12 +146,21 @@ static void cleanup_entries(const server_cfg &server, data_db &state_db) {
bool is_not_found{};
auto download = get_download(record_id, server, &is_not_found);
if (not download.has_value() && is_not_found) {
utils::error::handle_warn(
function_name, fmt::format("download not found|{}|{}|{}", server.id,
server.url, entry.download_id));
state_db.remove(entry.download_id);
if (download) {
continue;
}
utils::error::handle_warn(
function_name, fmt::format("download not found|{}|{}|{}", server.id,
server.url, entry.download_id));
if (not is_not_found) {
continue;
}
utils::error::handle_warn(
function_name, fmt::format("removing download|{}|{}|{}", server.id,
server.url, entry.download_id));
state_db.remove(entry.download_id);
}
}