diff --git a/plume-models/src/remote_fetch_actor.rs b/plume-models/src/remote_fetch_actor.rs index da73b077..097fb1da 100644 --- a/plume-models/src/remote_fetch_actor.rs +++ b/plume-models/src/remote_fetch_actor.rs @@ -17,24 +17,22 @@ pub struct RemoteFetchActor { impl RemoteFetchActor { pub fn init(conn: DbPool) { - ACTOR_SYS + let actor = ACTOR_SYS .actor_of_args::("remote-fetch", conn) .expect("Failed to initialize remote fetch actor"); - } -} -impl Actor for RemoteFetchActor { - type Msg = UserEvent; - - fn pre_start(&mut self, ctx: &Context) { USER_CHAN.tell( Subscribe { - actor: Box::new(ctx.myself()), + actor: Box::new(actor), topic: "*".into(), }, None, ) } +} + +impl Actor for RemoteFetchActor { + type Msg = UserEvent; fn recv(&mut self, _ctx: &Context, msg: Self::Msg, _sender: Sender) { use UserEvent::*;