qgis_deployment_toolbelt.jobs.job_cleanup_manager module¶
QDT autocleaner to remove stale resources generated by previous deployments.
Author: Julien Moura (https://github.com/guts)
- class qgis_deployment_toolbelt.jobs.job_cleanup_manager.CleanupReport(removed: list[Path] = <factory>, failed: list[Path] = <factory>)¶
Bases:
objectStructure to summarize a cleanup.
- class qgis_deployment_toolbelt.jobs.job_cleanup_manager.JobCleanupManager(options: dict)¶
Bases:
GenericJobJob to remove stale resources left over by previous QDT deployments.
- OPTIONS_SCHEMA: dict = {'deletion_mode': {'condition': 'in', 'default': None, 'possible_values': ('force_delete', 'trash_only', 'trash_or_delete'), 'required': False, 'type': <class 'str'>}, 'dry_run': {'condition': None, 'default': False, 'possible_values': None, 'required': False, 'type': <class 'bool'>}, 'scopes': {'condition': 'all_in', 'default': ['plugins_cache'], 'possible_values': ('plugins_cache', 'plugins_installed'), 'required': False, 'type': <class 'list'>}}¶
- cleanup_plugins_cache() None¶
Remove plugin archives from the QDT plugins cache folder which are not referenced by any installed or downloaded profile anymore.
- cleanup_plugins_installed() None¶
Remove stale plugin folders from installed QGIS profiles.
Only plugins listed in QDT managed plugins manifests are considered for cleanup. Third-party plugins manually installed by users are ignored.
- run() CleanupReport¶
Execute job logic.
- Returns:
summary of removed/failed resources
- Return type: