cleanup
This commit is contained in:
parent
3f5756f01c
commit
f90070139d
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user