Exemplo n.º 1
0
        private void ReceiveRequest(ReportRequest message)
        {
            Console.WriteLine("Koordinuj pico");
            var requestStatusMessage = new RequestStatusInfo(message.RequestUid, RequestStatus.New);

            reportStatusActor.Tell(requestStatusMessage);

            Interlocked.Increment(ref this.counter);
            reportProcessorActor.Forward(message);
        }
Exemplo n.º 2
0
        private void CreateReport(ReportRequest reportRequest)
        {
            Console.WriteLine($"Report Kurva  {actorNumber}");
            var requestStatusInfo = new RequestStatusInfo(reportRequest.RequestUid, RequestStatus.Assigned);

            reportStatusActor.Tell(requestStatusInfo);

            var newStatus = requestStatusInfo.WithNewStatusAndReportId(RequestStatus.Finished, 1);

            reportStatusActor.Tell(newStatus);
            Sender.Tell(newStatus);
        }
Exemplo n.º 3
0
        private void ReceiveRequestStatus(RequestStatusInfo message)
        {
            Console.WriteLine($"Status kua: ReportStatusActor.ReceiveRequestStatus: {message}");

            var @event = new RequestStatusUpdated(message.RequestUid, message.RequestStatus, message.ReportId);

            Persist(@event, m =>
            {
                Console.WriteLine("Status actor persisting");

                ReplayStatusInfoEvent(m);
            });
        }