mirror of
https://github.com/thegeneralist01/archivr
synced 2026-05-30 08:36:47 +02:00
Finalize archive runs at command level
This commit is contained in:
parent
c3c1b3d1e4
commit
ce3aaa8b76
1 changed files with 3 additions and 2 deletions
|
|
@ -518,7 +518,6 @@ fn record_media_entry(
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
database::complete_archive_run_item(conn, item.id, entry.id)?;
|
database::complete_archive_run_item(conn, item.id, entry.id)?;
|
||||||
database::finish_archive_run(conn, run.id)?;
|
|
||||||
Ok(entry)
|
Ok(entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -602,7 +601,6 @@ fn record_tweet_entry(
|
||||||
}
|
}
|
||||||
|
|
||||||
database::complete_archive_run_item(conn, item.id, entry.id)?;
|
database::complete_archive_run_item(conn, item.id, entry.id)?;
|
||||||
database::finish_archive_run(conn, run.id)?;
|
|
||||||
Ok(entry)
|
Ok(entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -719,6 +717,7 @@ fn main() -> Result<()> {
|
||||||
source,
|
source,
|
||||||
&tweet_id,
|
&tweet_id,
|
||||||
)?;
|
)?;
|
||||||
|
database::finish_archive_run(&conn, run.id)?;
|
||||||
println!(
|
println!(
|
||||||
"Tweet archived successfully to {}",
|
"Tweet archived successfully to {}",
|
||||||
store_path.join("raw_tweets").display()
|
store_path.join("raw_tweets").display()
|
||||||
|
|
@ -736,6 +735,7 @@ fn main() -> Result<()> {
|
||||||
source,
|
source,
|
||||||
&tweet_id,
|
&tweet_id,
|
||||||
)?;
|
)?;
|
||||||
|
database::finish_archive_run(&conn, run.id)?;
|
||||||
println!(
|
println!(
|
||||||
"Tweet already archived in {}",
|
"Tweet already archived in {}",
|
||||||
store_path.join("raw_tweets").display()
|
store_path.join("raw_tweets").display()
|
||||||
|
|
@ -856,6 +856,7 @@ fn main() -> Result<()> {
|
||||||
&file_extension,
|
&file_extension,
|
||||||
byte_size,
|
byte_size,
|
||||||
)?;
|
)?;
|
||||||
|
database::finish_archive_run(&conn, run.id)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue