Insert new commits into the queue
This commit is contained in:
parent
553a56bb12
commit
4f11b9c912
10 changed files with 128 additions and 14 deletions
|
|
@ -3,6 +3,7 @@
|
|||
// TODO `fetch` submodule for fetching new commits
|
||||
// TODO `queue` submodule for updating the queue
|
||||
|
||||
mod queue;
|
||||
mod repo;
|
||||
|
||||
use tracing::{debug_span, error, Instrument};
|
||||
|
|
@ -17,6 +18,14 @@ async fn recurring_task(state: &AppState) {
|
|||
}
|
||||
.instrument(debug_span!("update repo"))
|
||||
.await;
|
||||
|
||||
async {
|
||||
if let Err(e) = queue::update(&state.db).await {
|
||||
error!("Error updating queue:\n{e:?}");
|
||||
};
|
||||
}
|
||||
.instrument(debug_span!("update queue"))
|
||||
.await;
|
||||
}
|
||||
|
||||
pub async fn run(state: AppState) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue