Trivial fixes in recon middleware

Fix docstring and remove unused mount_check var.

Change-Id: I30ead8b72cb616d1311ffc81d9cfecb1afc9a05e
This commit is contained in:
Alistair Coles
2021-02-24 10:59:38 +00:00
parent a3d77cac07
commit 9eac76258a

View File

@@ -24,8 +24,7 @@ from swift import gettext_ as _
from swift.common.constraints import check_mount
from swift.common.storage_policy import POLICIES
from swift.common.swob import Request, Response
from swift.common.utils import get_logger, config_true_value, \
SWIFT_CONF_FILE, md5_hash_for_file
from swift.common.utils import get_logger, SWIFT_CONF_FILE, md5_hash_for_file
class ReconMiddleware(object):
@@ -35,7 +34,7 @@ class ReconMiddleware(object):
/recon/load|mem|async... will return various system metrics.
Needs to be added to the pipeline and requires a filter
declaration in the object-server.conf:
declaration in the [account|container|object]-server conf file:
[filter:recon]
use = egg:swift#recon
@@ -66,8 +65,6 @@ class ReconMiddleware(object):
self.rings.append(os.path.join(swift_dir,
policy.ring_name + '.ring.gz'))
self.mount_check = config_true_value(conf.get('mount_check', 'true'))
def _from_recon_cache(self, cache_keys, cache_file, openr=open):
"""retrieve values from a recon cache file