Beispiel #1
0
        private void BatchInsertDocuments <T>(List <CosmosDataDocument <T> > listOfFilesPerDay) where T : IOutputJson
        {
            logger.LogToConsole($"Starting to batch upload {listOfFilesPerDay.Count}  ('{projectName}') doc(s) to cosmos of ('{DocumentTypeHelper.GetDocumentType<T>()}') type.");

            var summary = dataDocumentRepository.BatchInsertCosmosDocuments(listOfFilesPerDay, LogBatchDetails);

            logger.LogToConsole($"Finished upload of {summary.NumberOfDocumentsInserted}  ('{projectName}')  doc(s) of ('{DocumentTypeHelper.GetDocumentType<T>()}') type in {summary.TotalTimeTaken.TotalSeconds} sec(s).");
        }