Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Nov 12, 2024
1 parent c20946c commit f94f032
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/gcs_bulk_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@


def schedule_gcs_deletion_job(project_id, gcs_bucket_name, path_to_delete):
"""Schedules an STS job to delete all files in a GCS path and waits for completion."""
"""
Schedules an STS job to delete all files in a GCS path and waits for completion.
This function uses a "trick" in STS to delete all files in a GCS path by transferring files from an empty bucket to
the target path with the `delete_objects_unique_in_sink` option enabled. This will delete all objects in the target
path that do not exist in the source path (which is empty).
"""

client = storage_transfer_v1.StorageTransferServiceClient()

Expand Down

0 comments on commit f94f032

Please sign in to comment.