public void Handle(ProjectionManagementMessage.Command.GetResult message) { var command = new GetResultCommand { Name = message.Name, Partition = message.Partition, }; _writer.PublishCommand("$get-result", command); }
public void Handle(ProjectionManagementMessage.Command.GetResult message) { if (!_started) { return; } var projection = GetProjection(message.Name); if (projection == null) { message.Envelope.ReplyWith(new ProjectionManagementMessage.NotFound()); } else { projection.Handle(message); } }
public void Handle(ProjectionManagementMessage.Command.GetResult message) { _lastAccessed = _timeProvider.Now; if (_state >= ManagedProjectionState.Running) { _getResultDispatcher.Publish( new CoreProjectionManagementMessage.GetResult(Guid.NewGuid(), Id, message.Partition, _workerId), m => message.Envelope.ReplyWith( new ProjectionManagementMessage.ProjectionResult(_name, m.Partition, m.Result, m.Position))); } else { message.Envelope.ReplyWith( new ProjectionManagementMessage.ProjectionResult( message.Name, message.Partition, "*** UNKNOWN ***", position: null)); } }