These are chat archives for petabridge/akka-bootcamp

May 2016
May 16 2016 10:35
This message was deleted
May 16 2016 11:27

Question on lesson Unit 1-4 about supervision.

I was interested in the failure case as well. Unfortunately, all my attempts to make the FileWatcher raise the Error event have failed. People say this FileWatcher is quite an unreliable thing and looks like it is. Another peculiarity: each Ctrl+S of the file triggers its Changed event twice.

So, to emulate the error I added to the beginning of FileObserver.OnFileChanged method the following:

if (DateTime.UtcNow.Ticks % 5 == 0)
    _tailActor.Tell(new TailActor.FileError(_fileNameOnly, "Emulated error."), ActorRefs.NoSender);