File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -349,8 +349,14 @@ def generate_static_files(remove_existing):
349
349
click .echo ("Done generating static files." )
350
350
351
351
352
- @cli .command ()
353
- def ensure_storage_buckets ():
352
+ @cli .group (name = "storage" )
353
+ def storage_group ():
354
+ """Commands for managing storage buckets and objects."""
355
+ pass
356
+
357
+
358
+ @storage_group .command ()
359
+ def init ():
354
360
"""Ensure that the storage buckets exist."""
355
361
for bucket_name in BucketName :
356
362
click .echo (f"Ensuring bucket '{ bucket_name } ' exists" )
@@ -367,9 +373,9 @@ def ensure_storage_buckets():
367
373
)
368
374
369
375
370
- @cli .command ()
376
+ @storage_group .command ()
371
377
@click .option ("--dry-run" , is_flag = True , default = False )
372
- def vacuum_storage_buckets (dry_run : bool ):
378
+ def vacuum (dry_run : bool ):
373
379
"""Vacuum the storage buckets to remove objects not referenced in the database."""
374
380
for bucket_name in BucketName :
375
381
click .echo (f"Vacuuming bucket '{ bucket_name } '" )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ nmdc-server migrate
22
22
nmdc-server generate-static-files --remove-existing
23
23
24
24
# Ensure cloud storage is set up
25
- nmdc-server ensure- storage-buckets
25
+ nmdc-server storage init
26
26
27
27
# # Start the server
28
28
uvicorn nmdc_server.asgi:app --host 0.0.0.0 --port 8000
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ passenv =
19
19
NMDC_TESTING_DATABASE_URI
20
20
commands =
21
21
nmdc-server generate-static-files --remove-existing
22
- nmdc-server ensure- storage-buckets
22
+ nmdc-server storage init
23
23
pytest {posargs} tests/
24
24
25
25
[testenv:ingest]
You can’t perform that action at this time.
0 commit comments