private async Task <IList <IListBlockContext <Journey, BatchDatesHeader> > > GetListBlocksAsync(ITaskExecutionContext taskExecutionContext)
        {
            using (var cs = taskExecutionContext.CreateCriticalSection())
            {
                if (await cs.TryStartAsync())
                {
                    var startDate = await GetDateRangeStartDateAsync(taskExecutionContext);

                    var endDate = DateTime.Now;

                    var journeys = await _travelDataService.GetJourneysAsync(startDate, endDate);

                    var batchHeader = new BatchDatesHeader()
                    {
                        FromDate = startDate,
                        ToDate   = endDate
                    };

                    short blockSize = 500;
                    return(await taskExecutionContext.GetListBlocksAsync <Journey, BatchDatesHeader>(x => x.WithPeriodicCommit(journeys.ToList(), batchHeader, blockSize, BatchSize.Fifty)));
                }
                throw new Exception("Could not acquire a critical section, aborted task");
            }
        }