avoid warn log on refresh repo task if no repo configured

This commit is contained in:
mbecker20
2024-08-15 03:24:27 -04:00
parent a2b0981f76
commit f70e359f14
3 changed files with 10 additions and 2 deletions

View File

@@ -90,6 +90,11 @@ impl Resolve<RefreshRepoCache, User> for State {
)
.await?;
if repo.config.repo.is_empty() {
// Nothing to do
return Ok(NoData {});
}
let config = core_config();
let repo_dir = config.repo_directory.join(random_string(10));

View File

@@ -11,11 +11,11 @@ use crate::{
};
// pub mod deployment;
pub mod deploy;
pub mod remote;
pub mod resource;
pub mod user_groups;
pub mod variables;
pub mod deploy;
mod file;
mod resources;
@@ -47,6 +47,9 @@ async fn refresh_syncs() {
return;
};
for sync in syncs {
if sync.config.repo.is_empty() {
continue;
}
State
.resolve(
RefreshResourceSyncPending { sync: sync.id },

View File

@@ -195,7 +195,7 @@ pub async fn refresh_repo_state_cache() {
}
.await
.inspect_err(|e| {
error!("failed to refresh repo state cache | {e:#}")
warn!("failed to refresh repo state cache | {e:#}")
});
}