Skip archived files which cannot be downloaded
This commit is contained in:
parent
f6a7490214
commit
1fd979b8e0
@ -162,12 +162,11 @@ pub async fn main() -> Result<()> {
|
|||||||
debug!(duration = ?files_resp.wait, "sleeping");
|
debug!(duration = ?files_resp.wait, "sleeping");
|
||||||
sleep(files_resp.wait).await;
|
sleep(files_resp.wait).await;
|
||||||
|
|
||||||
// Filter out replaced/deleted files (indicated by null category)
|
// Filter out replaced/deleted files (indicated by null category) and archived files
|
||||||
let files = files_resp
|
let files = files_resp
|
||||||
.files()?
|
.files()?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|file| match file.category {
|
.filter(|file| match file.category {
|
||||||
Some(_) => true,
|
|
||||||
None => {
|
None => {
|
||||||
info!(
|
info!(
|
||||||
name = file.file_name,
|
name = file.file_name,
|
||||||
@ -176,6 +175,8 @@ pub async fn main() -> Result<()> {
|
|||||||
);
|
);
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
Some(category) if category == "ARCHIVED" => false,
|
||||||
|
Some(_) => true,
|
||||||
});
|
});
|
||||||
|
|
||||||
for api_file in files {
|
for api_file in files {
|
||||||
|
Loading…
Reference in New Issue
Block a user