Fixed a couple of typos, and some config things I missed in the object-replicator
This commit is contained in:
parent
386eb29b1f
commit
cf35829e78
@ -47,7 +47,7 @@ if __name__ == '__main__':
|
||||
logger.critical('UNCAUGHT EXCEPTION', exc_info=exc_info)
|
||||
sys.stdout = sys.stderr = utils.LoggerFileObject(logger)
|
||||
|
||||
utils.drop_privileges(onf.get('user', 'swift'))
|
||||
utils.drop_privileges(conf.get('user', 'swift'))
|
||||
|
||||
try:
|
||||
os.setsid()
|
||||
|
@ -32,8 +32,8 @@ if __name__ == '__main__':
|
||||
print "Usage: object-replicator CONFIG_FILE [once]"
|
||||
sys.exit()
|
||||
c = ConfigParser()
|
||||
if not c.read(conf_file):
|
||||
print "Unable to read config file: %s" % conf_file
|
||||
if not c.read(sys.argv[1]):
|
||||
print "Unable to read config file"
|
||||
sys.exit(1)
|
||||
if c.has_section('object-replicator'):
|
||||
conf = dict(c.items('object-replicator'))
|
||||
|
@ -216,8 +216,8 @@ class ObjectReplicator(object):
|
||||
self.swift_dir = conf.get('swift_dir', '/etc/swift')
|
||||
self.port = int(conf.get('bind_port', 6000))
|
||||
self.concurrency = int(conf.get('concurrency', 1))
|
||||
self.timeout = conf['timeout']
|
||||
self.stats_interval = int(conf['stats_interval'])
|
||||
self.timeout = conf.get('timeout', '5')
|
||||
self.stats_interval = int(conf.get('stats_interval', '3600'))
|
||||
self.object_ring = Ring(join(self.swift_dir, 'object.ring.gz'))
|
||||
self.ring_check_interval = int(conf.get('ring_check_interval', 15))
|
||||
self.next_check = time.time() + self.ring_check_interval
|
||||
|
Loading…
Reference in New Issue
Block a user