public override void Start() { var orders = _marginTradingBlobRepository.Read <List <Order> >(LykkeConstants.StateBlobContainer, BlobName) ?? new List <Order>(); _orderCache.InitOrders(orders); base.Start(); }
public override void Start() { var orders = _marginTradingBlobRepository.Read <List <Order> >(LykkeConstants.StateBlobContainer, BlobName) ?? new List <Order>(); orders.ForEach(o => { // migrate orders to add LegalEntity field // todo: can be removed once published to prod if (o.LegalEntity == null) { o.LegalEntity = _accountsCacheService.Get(o.ClientId, o.AccountId).LegalEntity; } }); _orderCache.InitOrders(orders); base.Start(); }