mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-10 16:01:20 +00:00
update some tracing stuff
This commit is contained in:
@@ -313,6 +313,7 @@ impl Resolve<RunBuild, User> for State {
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument(skip(update))]
|
||||
async fn handle_early_return(
|
||||
mut update: Update,
|
||||
) -> anyhow::Result<Update> {
|
||||
@@ -394,7 +395,7 @@ impl Resolve<CancelBuild, User> for State {
|
||||
const BUILDER_POLL_RATE_SECS: u64 = 2;
|
||||
const BUILDER_POLL_MAX_TRIES: usize = 30;
|
||||
|
||||
#[instrument]
|
||||
#[instrument(skip_all, fields(build_id = build.id, update_id = update.id))]
|
||||
async fn get_build_builder(
|
||||
build: &Build,
|
||||
update: &mut Update,
|
||||
@@ -424,7 +425,7 @@ async fn get_build_builder(
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
#[instrument(skip_all, fields(build_id = build.id, update_id = update.id))]
|
||||
async fn get_aws_builder(
|
||||
build: &Build,
|
||||
config: AwsBuilderConfig,
|
||||
@@ -504,7 +505,7 @@ async fn get_aws_builder(
|
||||
Err(res.err().unwrap())
|
||||
}
|
||||
|
||||
#[instrument(skip(periphery))]
|
||||
#[instrument(skip(periphery, update))]
|
||||
async fn cleanup_builder_instance(
|
||||
periphery: PeripheryClient,
|
||||
cleanup_data: BuildCleanupData,
|
||||
|
||||
@@ -97,7 +97,7 @@ impl Resolve<CloneRepo, User> for State {
|
||||
update.finalize();
|
||||
|
||||
if update.success {
|
||||
update_last_pulled(&repo.name).await;
|
||||
update_last_pulled_time(&repo.name).await;
|
||||
}
|
||||
|
||||
handle_update_return(update).await
|
||||
@@ -170,13 +170,14 @@ impl Resolve<PullRepo, User> for State {
|
||||
update.finalize();
|
||||
|
||||
if update.success {
|
||||
update_last_pulled(&repo.name).await;
|
||||
update_last_pulled_time(&repo.name).await;
|
||||
}
|
||||
|
||||
handle_update_return(update).await
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument(skip_all, fields(update_id = update.id))]
|
||||
async fn handle_update_return(
|
||||
update: Update,
|
||||
) -> anyhow::Result<Update> {
|
||||
@@ -198,7 +199,8 @@ async fn handle_update_return(
|
||||
Ok(update)
|
||||
}
|
||||
|
||||
async fn update_last_pulled(repo_name: &str) {
|
||||
#[instrument]
|
||||
async fn update_last_pulled_time(repo_name: &str) {
|
||||
let res = db_client()
|
||||
.await
|
||||
.repos
|
||||
|
||||
Reference in New Issue
Block a user