private void HandleDeleteExperiment(DeleteExperiment deleteExperiment)
        {
            Result deletionResult = _repository.DeleteExperiment(deleteExperiment);

            if (deletionResult.IsFailure)
            {
                ExperimentDeletionFailed failedExperimentDeletion =
                    new ExperimentDeletionFailed(
                        deletionResult.Error,
                        deleteExperiment.LoggedInUserId,
                        deleteExperiment.SagaId
                        );
                _kafkaProducer.Produce(failedExperimentDeletion, EXPERIMENT_TOPIC);
                return;
            }

            ExperimentDeleted deletedExperiment =
                new ExperimentDeleted(
                    deleteExperiment.Id,
                    deleteExperiment.LoggedInUserId,
                    deleteExperiment.SagaId
                    );

            _kafkaProducer.Produce(deletedExperiment, EXPERIMENT_TOPIC);
        }
Esempio n. 2
0
 private void HandleExperimentDeleted(ExperimentDeleted u)
 {
     //todo
 }