*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 81a73693 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Update docs and command names for some files commands

parent 423d5ca0
Branches
Tags
1 merge request!2Modernization
......@@ -73,7 +73,7 @@ def deleted():
@option_pid_type
@with_appcontext
def list_deleted_files(pid, pid_type):
"""Hard-delete files that have already been soft-deleted.
"""List files that have already been soft-deleted.
Optionally, this operation can be restricted to the bucket associated with a draft
(via its PID).
......@@ -103,7 +103,7 @@ def list_deleted_files(pid, pid_type):
db.session.commit()
@deleted.command("rm")
@deleted.command("clean")
@click.confirmation_option(
prompt="are you sure you want to permanently remove soft-deleted files?"
)
......@@ -150,13 +150,17 @@ def hard_delete_files(pid, pid_type):
@files.group("orphans")
def orphans():
"""Management commands for orphaned files."""
"""Management commands for unreferenced files.
Orphaned files are those that are still present in the storage, but are not
referenced by any Location's buckets anymore.
"""
@orphans.command("list")
@with_appcontext
def list_orphan_files():
"""List files from locations that aren't referenced in any DB models anymore."""
"""List existing files that aren't referenced in Invenio anymore."""
for loc in Location.query.all():
# we only know how to handle directories on the file system for now
if os.path.isdir(loc.uri):
......@@ -177,7 +181,7 @@ def list_orphan_files():
)
@with_appcontext
def clean_files():
"""List files from locations that aren't referenced in any DB models anymore."""
"""Delete existing files that aren't referenced in Invenio anymore."""
for loc in Location.query.all():
# we only know how to handle directories on the file system for now
if not os.path.isdir(loc.uri):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment