Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson 1.5 does not provide option to submit exit command. #320

Open
woodpk opened this issue Jul 4, 2021 · 1 comment
Open

Lesson 1.5 does not provide option to submit exit command. #320

woodpk opened this issue Jul 4, 2021 · 1 comment

Comments

@woodpk
Copy link

woodpk commented Jul 4, 2021

With the changes in the console reader actor in lesson 5 unit 1, it seems the exit behavior has been removed. Is this intentional or accidental ? The console no longer reads / allows input after providing the file path and hitting enter.

@pyongary
Copy link

It looks like the FileValidatorActor should be changed to

        protected override void OnReceive(object message)
        {
            var msg = message as string;
            if (string.IsNullOrEmpty(msg))
            {
                _consoleWriterActor.Tell(new Messages.NullInputError("Input was blank. Please try again.\n"));

                Sender.Tell(new Messages.ContinueProcessing());
            }
            else
            {
                var vaild = isFileUri(msg);
                if (vaild)
                {
                    _consoleWriterActor.Tell(new Messages.InputSuccess($"Starting processing for {msg}"));
                    Context.ActorSelection("akka://MyActorSystem/user/tailCoordinatorActor").Tell(new TailCoordinatorActor.StartTail(msg, _consoleWriterActor));
                    // _tailCoordinatorActor.Tell(new TailCoordinatorActor.StartTail(msg, _consoleWriterActor));
                }
                else
                {
                    _consoleWriterActor.Tell(new Messages.ValidationError($"{msg} is not a existing URI on Disk.\n"));
                }
                Sender.Tell(new Messages.ContinueProcessing());
            }
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants