diff options
author | Matthew Oliver <matt@oliver.net.au> | 2021-03-31 15:07:39 +1100 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2021-06-29 15:22:57 -0700 |
commit | 85e36f7122b83d53b5ce931f72ebf6c6f6fdfaf4 (patch) | |
tree | ce2c58c1ad2e6fa1307169e0d0f0c1b526d7e7c4 /bin | |
parent | 8e1209d2b1b41193ddb3f616036d3a1475ed1210 (diff) | |
download | swift-85e36f7122b83d53b5ce931f72ebf6c6f6fdfaf4.tar.gz |
recon: refactor common recon names into a common location
Change-Id: I0a0766cfb6672377de0f152ce179c874c327ec54
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/swift-recon-cron | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/swift-recon-cron b/bin/swift-recon-cron index fa8051b66..f17223fee 100755 --- a/bin/swift-recon-cron +++ b/bin/swift-recon-cron @@ -24,6 +24,7 @@ from eventlet import Timeout from swift.common.utils import get_logger, dump_recon_cache, readconf, \ lock_path +from swift.common.recon import RECON_OBJECT_FILE, DEFAULT_RECON_CACHE_PATH from swift.obj.diskfile import ASYNCDIR_BASE @@ -57,9 +58,9 @@ def main(): sys.exit(1) conf = readconf(conf_path, 'filter:recon') device_dir = conf.get('devices', '/srv/node') - recon_cache_path = conf.get('recon_cache_path', '/var/cache/swift') + recon_cache_path = conf.get('recon_cache_path', DEFAULT_RECON_CACHE_PATH) recon_lock_path = conf.get('recon_lock_path', '/var/lock') - cache_file = os.path.join(recon_cache_path, "object.recon") + cache_file = os.path.join(recon_cache_path, RECON_OBJECT_FILE) lock_dir = os.path.join(recon_lock_path, "swift-recon-object-cron") conf['log_name'] = conf.get('log_name', 'recon-cron') logger = get_logger(conf, log_route='recon-cron') |