Skip to content

Conversation

@JVickery-TBS
Copy link

feat(commands): added commands to help manage remote uploads;

  • Added list-linked-uploads command.
  • Added list-unlinked-uploads command.
  • Added remove-unlinked-uploads command.
  • Added list-missing-uploads command.

These are just some utility commands to help sys admins manage their storage containers and remote uploads to them. There are some cases in ckan in which uploads would not be deleted (there are discussions ongoing related to that in ckan core).

The main one, is that when deleting a dataset/package, it does not delete the resources along with it, which means that the uploads for the resources do not get cleared. So the list-unlinked-uploads and remove-unlinked-uploads would help with this.

There have been a few cases in which files fail to upload to the storage containers, and either users do not notice it or do not report it. So the list-missing-uploads command helps with that.

The list type commands have an option to output useful data to a csv file. Otherwise it just outputs the number of uploads found, along with the total space used in the storage container.

- Added `list-linked-uploads` command.
- Added `list-unlinked-uploads` command.
- Added `remove-unlinked-uploads` command.
- Added `list-missing-uploads` command.
- Added method help text for click usage.
- Moved `fix-cors` and `migrate` sub-command callbacks to util script.
- Implemented `fix-cors` and `migrate` sub-commands with click.
- Added new sub-command `migrate-file`.
@JVickery-TBS
Copy link
Author

Also just implemented fix-cors and migrate sub-commands into clicks and util.py script.

Also added another new sub-command migrate-file which allows you to migrate a single file for a resource id, ignoring the directory structure of the CKAN Core storage which the migrate command uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant