Esempio n. 1
0
        public async Task DownloadFilesToBlobStorage()
        {
            var files     = _electionConfigurationSource.GetListOfFilesWithElectionResults();
            var timestamp = SystemTime.Now.ToUnixTimeSeconds();

            foreach (var file in files.Where(f => f.Active))
            {
                file.Name = $"{file.ResultsType.ConvertEnumToString()}_{file.ResultsLocation.ConvertEnumToString()}_{timestamp}.csv";
                await _bucketUploader.UploadFromUrl(file);
            }
        }
Esempio n. 2
0
        public async Task DownloadFilesToBlobStorage()
        {
            var files = await _electionConfigurationSource.GetListOfFilesWithElectionResults();

            var timestamp = SystemTime.Now.ToUnixTimeSeconds();

            foreach (var file in files)
            {
                file.Name = $"{file.Id}_{timestamp}.csv";
                await _bucketUploader.UploadFromUrl(file);
            }
        }
Esempio n. 3
0
 private async Task ProcessCsv(ElectionResultsFile file, long timestamp)
 {
     file.Name =
         $"{file.ResultsType.ConvertEnumToString()}_{file.ResultsLocation.ConvertEnumToString()}_{timestamp}.csv";
     await _bucketUploader.UploadFromUrl(file);
 }