forked from github-starred/komodo
avoid warn log on refresh repo task if no repo configured
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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:#}")
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user