Configuring Automatic Cleanup of Inactive Projects

By default, projects created by users in Ansys HPC Manager are stored there indefinitely, requiring manual cleanup once the storage becomes full.

To maximize storage capacity and avoid the need for manual cleanup, you can configure the Housekeeper Service to automatically remove projects that have had no activity for a specified amount of time.

When automatic cleanup is configured, projects that have not been modified for a defined duration (based on the last modified date) are flagged as inactive by the Housekeeper Service. Once a project has been flagged as inactive, a defined expiry period begins for that project. If the project remains unmodified during the expiry period, the project expires at the end of the expiry period and is automatically deleted.

If the project is modified during the expiry period, the project becomes active again, and the expiry period is removed.


Note:  Projects with running jobs are ignored by the cleanup routine.


To configure automatic cleanup of inactive projects:

  1. Edit the Housekeeper Service configuration file.

  2. Specify the following settings:

    SettingValue to setDescription

    tasks.deactivate_projects.enabled

    default = False

    True

    Enables the automated deactivation of projects based on their modification time

    tasks.deactivate_projects.interval

    default=86400 (equivalent to one day)

    The frequency (in seconds) at which you want the Housekeeper Service to check for projects that qualify as inactiveSpecifies the interval (in seconds) at which projects should be checked for automated inactivation

    tasks.deactivate_projects.clean_up_duration

    default="30d"

    The amount of time (in hours, days, or weeks) a project must remain unmodified before it is marked as inactiveSpecifies the time difference from the current date and time, in a human-readable format (supported units: h for hours, d for days, w for weeks), used to retrieve projects based on their last modification time

    tasks.deactivate_projects.expire_duration

    default="30d"

    The amount of time (in hours, days, or weeks) an inactive project must remain inactive before it is deletedSpecifies the duration, in a human-readable format (supported units: h for hours, d for days, w for weeks), from the current time until the project expires