private async Task ProcessBlockAsync(IListBlockContext <Journey, BatchDatesHeader> blockContext)
        {
            try
            {
                await blockContext.StartAsync();

                foreach (var journeyItem in await blockContext.GetItemsAsync(ItemStatus.Pending, ItemStatus.Failed))
                {
                    await ProcessJourneyAsync(journeyItem);
                }

                await blockContext.CompleteAsync();
            }
            catch (Exception ex)
            {
                await blockContext.FailedAsync(ex.ToString());
            }
        }
Example #2
0
        private void ProcessBlock(IListBlockContext <Journey, BatchDatesHeader> blockContext)
        {
            try
            {
                blockContext.Start();

                foreach (var journeyItem in blockContext.GetItems(ItemStatus.Pending, ItemStatus.Failed))
                {
                    ProcessJourney(journeyItem);
                }

                blockContext.Complete();
            }
            catch (Exception ex)
            {
                blockContext.Failed(ex.ToString());
            }
        }
        private void ProcessBlock(IListBlockContext<Journey, BatchDatesHeader> blockContext)
        {
            try
            {
                blockContext.Start();

                foreach (var journeyItem in blockContext.GetItems(ItemStatus.Pending, ItemStatus.Failed))
                    ProcessJourney(journeyItem);

                blockContext.Complete();
            }
            catch (Exception ex)
            {
                blockContext.Failed(ex.ToString());
            }
        }
Example #4
0
 internal void SetParentContext(IListBlockContext <T> parentContext)
 {
     _parentContext = (ListBlockContext <T>)parentContext;
 }