Fix a bug with garbage collection not working correctly if config
options are not set.
@@ -132,21 +132,22 @@ class GarbageCollectorService(object):
# Note: We sleep for a bit between garbage collection of each object type to prevent busy
# waiting
- if self._action_executions_ttl >= MINIMUM_TTL_DAYS:
+ if self._action_executions_ttl and self._action_executions_ttl >= MINIMUM_TTL_DAYS:
self._purge_action_executions()
eventlet.sleep(self._sleep_delay)
else:
LOG.debug('Skipping garbage collection for action executions since it\'s not '
'configured')
- if self._action_executions_output_ttl >= MINIMUM_TTL_DAYS_EXECUTION_OUTPUT:
+ if self._action_executions_output_ttl and \
+ self._action_executions_output_ttl >= MINIMUM_TTL_DAYS_EXECUTION_OUTPUT:
self._purge_action_executions_output()
eventlet.sleep(self._sleep_delay)
else:
LOG.debug('Skipping garbage collection for action executions output since it\'s not '
'configured')
- if self._trigger_instances_ttl >= MINIMUM_TTL_DAYS:
+ if self._trigger_instances_ttl and self._trigger_instances_ttl >= MINIMUM_TTL_DAYS:
self._purge_trigger_instances()
eventlet.sleep(self._sleep_delay)
else:
