Compare commits
6 commits
0796af1485
...
1135d48c97
Author | SHA1 | Date | |
---|---|---|---|
1135d48c97 | |||
0f8320f425 | |||
eb28a2b690 | |||
bd3fb7cff2 | |||
8f786abe60 | |||
e82c2804dc |
2 changed files with 13 additions and 26 deletions
|
@ -716,7 +716,7 @@ pub mod given {
|
|||
pub fn a_git_dir(fs: &kxio::fs::FileSystem) -> GitDir {
|
||||
let dir_name = a_name();
|
||||
let dir = fs.base().join(dir_name);
|
||||
GitDir::new(&dir)
|
||||
GitDir::new(dir)
|
||||
}
|
||||
|
||||
pub fn a_forge_config() -> ForgeConfig {
|
||||
|
@ -730,9 +730,9 @@ pub mod given {
|
|||
}
|
||||
|
||||
pub fn a_server_repo_config() -> ServerRepoConfig {
|
||||
let main = a_branch_name().into_string();
|
||||
let next = a_branch_name().into_string();
|
||||
let dev = a_branch_name().into_string();
|
||||
let main = a_branch_name().to_string();
|
||||
let next = a_branch_name().to_string();
|
||||
let dev = a_branch_name().to_string();
|
||||
ServerRepoConfig::new(
|
||||
format!("{}/{}", a_name(), a_name()),
|
||||
main.clone(),
|
||||
|
|
|
@ -101,13 +101,7 @@ impl Handler<ServerConfig> for Server {
|
|||
|
||||
// Forge Actors
|
||||
for (forge_alias, forge_config) in server_config.forges() {
|
||||
self.create_forge_repos(
|
||||
forge_config,
|
||||
forge_alias.clone(),
|
||||
server_storage,
|
||||
webhook,
|
||||
self.sleep_duration,
|
||||
)
|
||||
self.create_forge_repos(forge_config, forge_alias.clone(), server_storage, webhook)
|
||||
.into_iter()
|
||||
.map(|a| self.start_actor(a))
|
||||
.map(|(repo_alias, addr)| {
|
||||
|
@ -164,7 +158,6 @@ impl Server {
|
|||
forge_name: ForgeAlias,
|
||||
server_storage: &ServerStorage,
|
||||
webhook: &Webhook,
|
||||
sleep_duration: std::time::Duration,
|
||||
) -> Vec<(ForgeAlias, RepoAlias, repo_actor::RepoActor)> {
|
||||
let span =
|
||||
tracing::info_span!("create_forge_repos", name = %forge_name, config = %forge_config);
|
||||
|
@ -172,13 +165,7 @@ impl Server {
|
|||
let _guard = span.enter();
|
||||
info!("Creating Forge");
|
||||
let mut repos = vec![];
|
||||
let creator = self.create_actor(
|
||||
forge_name,
|
||||
forge_config.clone(),
|
||||
server_storage,
|
||||
webhook,
|
||||
sleep_duration,
|
||||
);
|
||||
let creator = self.create_actor(forge_name, forge_config.clone(), server_storage, webhook);
|
||||
for (repo_alias, server_repo_config) in forge_config.repos() {
|
||||
let forge_repo = creator((repo_alias, server_repo_config));
|
||||
info!(
|
||||
|
@ -196,7 +183,6 @@ impl Server {
|
|||
forge_config: ForgeConfig,
|
||||
server_storage: &ServerStorage,
|
||||
webhook: &Webhook,
|
||||
sleep_duration: std::time::Duration,
|
||||
) -> impl Fn((RepoAlias, &ServerRepoConfig)) -> (ForgeAlias, RepoAlias, repo_actor::RepoActor)
|
||||
{
|
||||
let server_storage = server_storage.clone();
|
||||
|
@ -204,6 +190,7 @@ impl Server {
|
|||
let net = self.net.clone();
|
||||
let repo = self.repo.clone();
|
||||
let generation = self.generation;
|
||||
let sleep_duration = self.sleep_duration;
|
||||
move |(repo_alias, server_repo_config)| {
|
||||
let span = tracing::info_span!("create_actor", alias = %repo_alias, config = %server_repo_config);
|
||||
let _guard = span.enter();
|
||||
|
|
Loading…
Reference in a new issue