Management commands
Within the Docker container of the Arkindex backend, the arkindex executable provides a multitude of subcommands to help manage an Arkindex instance, develop on Arkindex, or troubleshoot issues.
This page only documents some of the available subcommands. To retrieve a list of all available subcommands, run arkindex --help. To get help about a single subcommand, use arkindex <subcommand> --help.
cleanup_unused_corpus
| This command is only available in Enterprise Edition. |
Detects inactive projects within a specified category, then either warns of their imminent deletion or deletes them.
arkindex cleanup_unused_corpus
[--dry-run]
[--inactive-day-warning <days>]
[--inactive-day-deletion <days>]
<category_slug>
This command may perform one of three actions on a project:
-
Mark a project as expiring if it appears to have been inactive over the specified warning delay, emailing all users that are administrators of the project about this expiration;
-
Unset the expiration warning if the project became active again;
-
Delete the project, if it was already marked as expiring and is still inactive after the specified deletion delay, emailing all project administrators of the deletion.
The default warning delay is 30 days, and the default deletion delay is 90 days.
The --dry-run option will cause this command to only print what it would do, without updating or deleting any project and without sending emails.
Whether or not a project is active is determined by:
-
the last update date of the project itself;
-
the last update date of any element within the project;
-
the last update date of any process within the project.
When combining this command with the default_corpus_category setting, it becomes possible to allow users to create any project, then have them automatically deleted when they become inactive, unless an instance administrator intervenes to change the project’s category to a different one.
This command is intended to be run periodically, for example as a cron job.