Skip to content

Commit

Permalink
add logging for deletion method
Browse files Browse the repository at this point in the history
  • Loading branch information
pluckyswan committed Jan 10, 2025
1 parent 36a56b1 commit b205243
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ public AzureBlobOrganizer(BlobContainerClient blobContainerClient) {

private void deleteOldBlobs(String testType, ZoneId timeZone) {
String destinationName = LocalDate.now(timeZone) + testType;
System.out.println("Checking folder:" + destinationName);
if (blobContainerClient.getBlobClient(destinationName).exists()) {
System.out.println("Deleting old blobs in folder " + destinationName + "...");
blobContainerClient.getBlobClient(destinationName).delete();
} else {
System.out.println("No old blobs in folder " + destinationName);
}
}

Expand Down

0 comments on commit b205243

Please sign in to comment.