delete comments from WorkModeling

This commit is contained in:
DavidMakarov 2024-05-03 13:52:55 +04:00
parent 19e238d2cc
commit 66344e9d47

View File

@ -10,9 +10,7 @@ namespace FlowerShopBusinessLogic.BusinessLogics
public class WorkModeling : IWorkProcess
{
private readonly ILogger _logger;
private readonly Random _rnd;
private IOrderLogic? _orderLogic;
public WorkModeling(ILogger<WorkModeling> Logger)
@ -35,7 +33,6 @@ namespace FlowerShopBusinessLogic.BusinessLogics
var Orders = _orderLogic.ReadList(new OrderSearchModel { Status = OrderStatus.Принят });
var BeingProcessedOrders = _orderLogic.ReadList(new OrderSearchModel { Status = OrderStatus.Выполняется });
// in case there are BeingProcessed orders but no Accepted orders
if (Orders == null || BeingProcessedOrders == null || (Orders.Count == 0 && BeingProcessedOrders.Count == 0))
{
@ -68,8 +65,6 @@ namespace FlowerShopBusinessLogic.BusinessLogics
{
_logger.LogDebug("WorkerWorkAsync. Worker {Id} try get order {Order}", Implementer.Id, Order.Id);
// TakeOrderInWork will fail when the worker tries to change status to BeingProcessed when the order is already BeingProcessed
// which would happen when other worker already acquired that order
bool AcquireResult = _orderLogic.TakeOrderInWork(new OrderBindingModel
{
Id = Order.Id,