diff --git a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs index 3ba8066..d8480ef 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs @@ -71,17 +71,15 @@ namespace AbstractSoftwareInstallationBusinessLogic.BusinessLogic })) { // делаем работу - Thread.Sleep(implementer.WorkExperience * _rnd.Next(1000, 10000) * order.Count); + Thread.Sleep(implementer.WorkExperience * _rnd.Next(100, 1000) * order.Count); _logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, order.Id); _orderLogic.FinishOrder(new OrderBindingModel { Id = order.Id, ImplementerId = implementer.Id }); - // отдыхаем - Thread.Sleep(implementer.Qualification * _rnd.Next(10, 100)); - } + } } // кто-то мог уже перехватить заказ, игнорируем ошибку catch (InvalidOperationException ex) @@ -94,6 +92,8 @@ namespace AbstractSoftwareInstallationBusinessLogic.BusinessLogic _logger.LogError(ex, "Error while do work"); throw; } + // отдыхаем + Thread.Sleep(implementer.Qualification * _rnd.Next(10, 100)); } }); } @@ -138,7 +138,5 @@ namespace AbstractSoftwareInstallationBusinessLogic.BusinessLogic throw; } } - - } }