Add very basic crawl job

Loops through feeds and adds items from each feed.
This commit is contained in:
2023-05-09 23:46:42 -04:00
parent 89fdf8f95a
commit ae8f15f19b
18 changed files with 327 additions and 56 deletions

View File

@@ -25,8 +25,8 @@ pub enum Error {
#[error("{0}: {1} not found")]
NotFound(&'static str, i32),
#[error("referenced {0}: {1} not found")]
RelationNotFound(&'static str, i32),
#[error("referenced {0} not found")]
RelationNotFound(&'static str),
}
pub type Result<T, E = Error> = ::std::result::Result<T, E>;
@@ -69,7 +69,7 @@ impl Error {
match self {
NotFound(_, _) => StatusCode::NOT_FOUND,
Sqlx(_) | Anyhow(_) => StatusCode::INTERNAL_SERVER_ERROR,
InvalidEntity(_) | RelationNotFound(_, _) => StatusCode::UNPROCESSABLE_ENTITY,
InvalidEntity(_) | RelationNotFound(_) => StatusCode::UNPROCESSABLE_ENTITY,
}
}
}