watcher.db.purge
Modulewatcher.db.purge
Module¶watcher.db.purge.
PurgeCommand
(age_in_days=None, max_number=None, uuid=None, exclude_orphans=False, dry_run=None)[source]¶Bases: object
Purges the DB by removing soft deleted entries
The workflow for this purge is the following:
# Find soft deleted objects which are expired # Find orphan objects # Find their related objects whether they are expired or not # Merge them together # If it does not exceed the limit, destroy them all
find_objects_to_delete
()[source]¶Finds all the objects to be purged
Returns: | A mapping with all the Watcher objects to purged |
---|---|
Return type: | WatcherObjectsMap instance |
watcher.db.purge.
WatcherObjectsMap
[source]¶Bases: object
Wrapper to deal with watcher objects per type
This wrapper object contains a list of watcher objects per type. Its main use is to simplify the merge of watcher objects by avoiding duplicates, but also for representing the relationships between these objects.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.