I start my actor in 2 with the controller. I have read somewhere that I have to stop my actors when I close it as an example below, then I have a problem that do not upload the file at all. When I comment that it starts uploading
// aka actor system system = acq. System (); ActorRef uploader = system.actorOf (New Propes (UploaderActor.class), "Uploader"); Uploader.tell (new uploader (post.id, "/ public / picture / post /", post, request ()), uploader); //system.stop(uploader); My question is when will I have to stop my actor? An additional question:
How can I get this actor from another controller (get this reference)?
I recommend creating a long-term uploader, which you send upload-messages , And it can make a new actor internally to upload it real and if it is necessary it can close it, it frees the customer from managing the life cycle.
No comments:
Post a Comment