From f842545b3e63dd008349fef4377aba59b4e8ece6 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Tue, 3 May 2016 13:11:21 -0400 Subject: [PATCH] rename config values to remove "Quay" (#1431) --- config.py | 11 +++++------ workers/service_key_worker.py | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) 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')