forked from kemitix/git-next
feat(actors/repo): add RepoActor::new
This commit is contained in:
parent
c3f2266dc1
commit
abbd2e66e6
2 changed files with 12 additions and 4 deletions
|
@ -4,7 +4,12 @@ use tracing::info;
|
|||
use crate::server::config::RepoDetails;
|
||||
|
||||
pub struct RepoActor {
|
||||
pub details: RepoDetails,
|
||||
details: RepoDetails,
|
||||
}
|
||||
impl RepoActor {
|
||||
pub(crate) const fn new(details: RepoDetails) -> Self {
|
||||
Self { details }
|
||||
}
|
||||
}
|
||||
impl Actor for RepoActor {
|
||||
type Context = Context<Self>;
|
||||
|
|
|
@ -57,9 +57,12 @@ pub fn start(fs: FileSystem) {
|
|||
let span = tracing::info_span!("Repo", %repo_name, %repo);
|
||||
let _guard = span.enter();
|
||||
info!("Creating Repo");
|
||||
let actor = actors::repo::RepoActor {
|
||||
details: config::RepoDetails::new(&repo_name, repo, &forge_name, forge),
|
||||
};
|
||||
let actor = actors::repo::RepoActor::new(config::RepoDetails::new(
|
||||
&repo_name,
|
||||
repo,
|
||||
&forge_name,
|
||||
forge,
|
||||
));
|
||||
actors.push((forge_name.clone(), repo_name, actor));
|
||||
info!("Created Repo");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue