private async Task OnSagaProcessingStart(ExecutionStartMessage msg)
        {
            ISagaLocking sagaLocking = serviceProvider.GetRequiredService <ISagaLocking>();

            if (!await sagaLocking.Acquire(msg.SagaID))
            {
                throw new SagaIsBusyException(msg.SagaID);
            }
        }
Esempio n. 2
0
        private async Task OnSagaProcessingStart(ExecutionStartMessage msg)
        {
            ISagaLocking sagaLocking = serviceProvider.GetRequiredService <ISagaLocking>();
            var          id          = msg?.Saga?.Data?.ID;

            if (id == null)
            {
                return;
            }

            if (!await sagaLocking.Acquire(id.Value))
            {
                throw new SagaIsBusyException(id.Value);
            }
        }
Esempio n. 3
0
 private async Task OnSagaProcessingStart(ExecutionStartMessage msg)
 {
     await Callbacks.ExecuteBeforeRequestCallbacks(serviceProvider, msg.Saga);
 }