Skip to content
Laura Wrubel edited this page Oct 4, 2023 · 2 revisions

Cleaning up unused Globus directories

When a JobRun completes successfully the Globus Access Rule for the staging location is removed after 2 weeks. However it's possible that a user could create multiple Globus Access Rules by clicking the "Request Globus Link" button many times, and then not use the Globus directories. This will result in clutter on the file system, and will eventually lock the user out of creating new Globus Access Rules, which are capped at 100 rules per user.

When the user is prevented from creating new Globus Access Rules they will be given an error message with an email link to contact the SDR Repository Manager. Running the following rake task will:

  1. Delete Globus Access Rules for that user where the GlobusDestination has not been updated to have a deleted_at date.
  2. Delete the staging locations for these GlobusDestinations when there are no contents in the staging location directory.
RAILS_ENV=production bin/rake globus:prune_access[edsu]