diff --git a/config.py b/config.py index 3abeb39d6..e61dab376 100644 --- a/config.py +++ b/config.py @@ -298,9 +298,6 @@ class DefaultConfig(object): # If None, will be calculated off of the SERVER_HOSTNAME (default) JWTPROXY_AUDIENCE = None - # The location of the private key generated for this instance - INSTANCE_SERVICE_KEY_LOCATION = 'conf/quay.pem' - # Torrent management flags FEATURE_BITTORRENT = False BITTORRENT_PIECE_SIZE = 512 * 1024 @@ -323,7 +320,9 @@ class DefaultConfig(object): # lowest user in the database will be used. SERVICE_LOG_ACCOUNT_ID = None - # Quay's service key expiration in minutes - QUAY_SERVICE_KEY_EXPIRATION = 120 + # The location of the private key generated for this instance + INSTANCE_SERVICE_KEY_LOCATION = 'conf/quay.pem' + # This instance's service key expiration in minutes + INSTANCE_SERVICE_KEY_EXPIRATION = 120 # Number of minutes between expiration refresh in minutes - QUAY_SERVICE_KEY_REFRESH = 60 + INSTANCE_SERVICE_KEY_REFRESH = 60 diff --git a/workers/service_key_worker.py b/workers/service_key_worker.py index 59a07ef62..a21ef3f69 100644 --- a/workers/service_key_worker.py +++ b/workers/service_key_worker.py @@ -11,7 +11,7 @@ class ServiceKeyWorker(Worker): def __init__(self): super(ServiceKeyWorker, self).__init__() self.add_operation(self._refresh_service_keys, - app.config.get('QUAY_SERVICE_KEY_REFRESH', 60)*60) + app.config.get('INSTANCE_SERVICE_KEY_REFRESH', 60)*60) def _refresh_service_keys(self): """ @@ -20,7 +20,7 @@ class ServiceKeyWorker(Worker): with open("/conf/quay.kid") as f: kid = f.read() - minutes_until_expiration = app.config.get('QUAY_SERVICE_KEY_EXPIRATION', 120) + minutes_until_expiration = app.config.get('INSTANCE_SERVICE_KEY_EXPIRATION', 120) expiration = timedelta(minutes=minutes_until_expiration) logger.debug('Starting refresh of automatic service keys')