diff --git a/config.py b/config.py index d3a53cff8..a31478874 100644 --- a/config.py +++ b/config.py @@ -256,8 +256,8 @@ class DefaultConfig(object): DOCUMENTATION_LOCATION = 'http://docs.quay.io' DOCUMENTATION_METADATA = 'https://coreos.github.io/quay-docs/search.json' - # Experiment: Async garbage collection - EXP_ASYNC_GARBAGE_COLLECTION = [] + # How often the Garbage Collection worker runs. + GARBAGE_COLLECTION_FREQUENCY = 30 # seconds # Security scanner FEATURE_SECURITY_SCANNER = False diff --git a/workers/gcworker.py b/workers/gcworker.py index 40a24ec39..0c4e17465 100644 --- a/workers/gcworker.py +++ b/workers/gcworker.py @@ -9,7 +9,8 @@ logger = logging.getLogger(__name__) class GarbageCollectionWorker(Worker): def __init__(self): super(GarbageCollectionWorker, self).__init__() - self.add_operation(self._garbage_collection_repos, 30) + self.add_operation(self._garbage_collection_repos, + app.config.get('GARBAGE_COLLECTION_FREQUENCY', 30)) def _garbage_collection_repos(self): """ Performs garbage collection on repositories. """