~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to swift/obj/auditor.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-01-28 09:40:30 UTC
  • mfrom: (1.2.16)
  • Revision ID: package-import@ubuntu.com-20130128094030-aetz57x2qz9ye2d4
Tags: 1.7.6-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
class AuditorWorker(object):
32
32
    """Walk through file system to audit object"""
33
33
 
34
 
    def __init__(self, conf, zero_byte_only_at_fps=0):
 
34
    def __init__(self, conf, logger, zero_byte_only_at_fps=0):
35
35
        self.conf = conf
36
 
        self.logger = get_logger(conf, log_route='object-auditor')
 
36
        self.logger = logger
37
37
        self.devices = conf.get('devices', '/srv/node')
38
38
        self.mount_check = config_true_value(conf.get('mount_check', 'true'))
39
39
        self.max_files_per_second = float(conf.get('files_per_second', 20))
224
224
        """Run the object audit once."""
225
225
        mode = kwargs.get('mode', 'once')
226
226
        zero_byte_only_at_fps = kwargs.get('zero_byte_fps', 0)
227
 
        worker = AuditorWorker(self.conf,
 
227
        worker = AuditorWorker(self.conf, self.logger,
228
228
                               zero_byte_only_at_fps=zero_byte_only_at_fps)
229
229
        worker.audit_all_objects(mode=mode)