Just change how --full affects the Steam refresh

This commit is contained in:
mtkennerly 2024-06-02 23:37:16 -04:00
parent c6ced7e122
commit b8d956827e
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408

View file

@ -45,6 +45,10 @@ pub enum Subcommand {
/// Fetch bulk updates from the data sources. /// Fetch bulk updates from the data sources.
/// By default, this only updates entries that are marked as outdated. /// By default, this only updates entries that are marked as outdated.
Bulk { Bulk {
/// Do a full sync.
#[clap(long)]
full: bool,
/// Only refresh this many entries. /// Only refresh this many entries.
#[clap(long)] #[clap(long)]
limit: Option<usize>, limit: Option<usize>,
@ -102,13 +106,14 @@ pub async fn run(
) -> Result<(), Error> { ) -> Result<(), Error> {
match sub { match sub {
Subcommand::Bulk { Subcommand::Bulk {
full,
limit, limit,
recent_changes, recent_changes,
missing_pages, missing_pages,
wiki_from, wiki_from,
steam_from, steam_from,
} => { } => {
let outdated_only = wiki_from.is_none(); let outdated_only = !full && wiki_from.is_none();
if recent_changes { if recent_changes {
wiki_cache.flag_recent_changes(wiki_meta_cache).await?; wiki_cache.flag_recent_changes(wiki_meta_cache).await?;
} }