mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-28 02:19:34 +02:00
refactor: replace Box<dyn Error> with anyhow::Result
- ingestion_pipeline::run_worker_loop returns anyhow::Result<()> - api_router::ApiState::new returns anyhow::Result<Self> - html_router::HtmlState::new_with_resources is infallible, returns Self - main/server/worker binary entry points return anyhow::Result<()>
This commit is contained in:
@@ -17,7 +17,7 @@ use uuid::Uuid;
|
||||
pub async fn run_worker_loop(
|
||||
db: Arc<SurrealDbClient>,
|
||||
ingestion_pipeline: Arc<IngestionPipeline>,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
) -> anyhow::Result<()> {
|
||||
let worker_id = format!("ingestion-worker-{}", Uuid::new_v4());
|
||||
let lease_duration = Duration::from_secs(DEFAULT_LEASE_SECS as u64);
|
||||
let idle_backoff = Duration::from_millis(500);
|
||||
|
||||
Reference in New Issue
Block a user