private static async Task <List <string> > GetThumbnails(string workingDir, ILogger log) { log.LogInformation($"GetThumbnails"); var blobList = await BlobHelper.GetBlobList(log); return(await BlobHelper.DownloadBlobs(blobList, workingDir, log)); }
public async Task UploadRandomBlob() { //arrange string videoFile = config.GetValue <string>("videoFile"); //act BlobHelper.CreateStorageConnection(config.GetValue <string>("rawStorageConnectionString"), config.GetValue <string>("rawContainerRef")); await BlobHelper.UploadSummary(videoFile, newVideoId, log); var getBlobList = await BlobHelper.GetBlobList(log); var res = getBlobList.Results.Where(x => ((CloudBlockBlob)x).Name == newVideoId).FirstOrDefault(); // assert Assert.AreEqual(newVideoId, ((CloudBlockBlob)res).Name); }
public static void Run([QueueTrigger("cleanup-queue", Connection = "")] string myQueueItem, TraceWriter log) { try { log.Info($"C# Queue trigger function processed: {myQueueItem}"); var message = JsonConvert.DeserializeObject <DeleteMessage>(myQueueItem); if (!message.DeleteAll) { return; } var blobList = BlobHelper.GetBlobList(message.TargetContainer); foreach (var blob in blobList) { blob.DeleteIfExistsAsync(); } } catch (Exception ex) { log.Error($"Error on clean up function exception message: {ex.Message}"); throw; } }