We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3993023 commit 4d858d6Copy full SHA for 4d858d6
1 file changed
infra/scripts/cleanup_dynamo_ci.py
@@ -1,15 +1,21 @@
1
import boto3
2
+from tqdm import tqdm
3
4
5
def main() -> None:
6
db = boto3.resource("dynamodb")
7
- num_deleted = 0
8
- for table in db.tables.all():
+ num_to_delete = 0
9
+ all_tables = db.tables.all()
10
+ for table in all_tables:
11
if "integration_test" in table.name:
- table.delete()
- num_deleted += 1
12
- print(f"Deleted {num_deleted} CI DynamoDB tables")
+ num_to_delete += 1
13
+ with tqdm(total=num_to_delete) as progress:
14
15
+ if "integration_test" in table.name:
16
+ table.delete()
17
+ progress.update()
18
+ print(f"Deleted {num_to_delete} CI DynamoDB tables")
19
20
21
if __name__ == "__main__":
0 commit comments