fix: simplify asset serving, use fallback primarily

This commit is contained in:
2025-09-13 12:23:27 -05:00
parent 9d51fde893
commit a917315967
3 changed files with 35 additions and 50 deletions
+7 -5
View File
@@ -50,15 +50,15 @@ struct Args {
tracing: TracingFormat,
/// Services to run (comma-separated). Default: all services
///
///
/// Examples:
/// --services bot,web # Run only bot and web services
/// --services scraper # Run only the scraper service
#[arg(long, value_delimiter = ',', conflicts_with = "disable_services")]
services: Option<Vec<ServiceName>>,
/// Services to disable (comma-separated)
///
///
/// Examples:
/// --disable-services bot # Run web and scraper only
/// --disable-services bot,web # Run only the scraper service
@@ -89,7 +89,7 @@ impl ServiceName {
fn all() -> Vec<ServiceName> {
vec![ServiceName::Bot, ServiceName::Web, ServiceName::Scraper]
}
/// Convert to string for service registration
fn as_str(&self) -> &'static str {
match self {
@@ -121,7 +121,9 @@ fn determine_enabled_services(args: &Args) -> Result<Vec<ServiceName>, anyhow::E
}
(Some(_), Some(_)) => {
// This should be prevented by clap's conflicts_with, but just in case
Err(anyhow::anyhow!("Cannot specify both --services and --disable-services"))
Err(anyhow::anyhow!(
"Cannot specify both --services and --disable-services"
))
}
}
}