From 81a7369339a77a11dcec064f844ebae54c45eda6 Mon Sep 17 00:00:00 2001 From: Maximilian Moser <maximilian.moser@tuwien.ac.at> Date: Tue, 13 Jul 2021 14:03:17 +0200 Subject: [PATCH] Update docs and command names for some files commands --- invenio_utilities_tuw/cli/files.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/invenio_utilities_tuw/cli/files.py b/invenio_utilities_tuw/cli/files.py index e6f8b99..258d5f6 100644 --- a/invenio_utilities_tuw/cli/files.py +++ b/invenio_utilities_tuw/cli/files.py @@ -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): -- GitLab