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

« back to all changes in this revision

Viewing changes to swift/container/auditor.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, James Page, Chuck Short
  • Date: 2013-08-13 10:37:13 UTC
  • mfrom: (1.2.21)
  • Revision ID: package-import@ubuntu.com-20130813103713-1ctbx4zifyljs2aq
Tags: 1.9.1-0ubuntu1
[ James Page ]
* d/control: Update VCS fields for new branch locations.

[ Chuck Short ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
import os
17
17
import time
 
18
from gettext import gettext as _
18
19
from random import random
19
20
 
20
21
from eventlet import Timeout
49
50
 
50
51
    def _one_audit_pass(self, reported):
51
52
        all_locs = audit_location_generator(self.devices,
52
 
                                            container_server.DATADIR,
 
53
                                            container_server.DATADIR, '.db',
53
54
                                            mount_check=self.mount_check,
54
55
                                            logger=self.logger)
55
56
        for path, device, partition in all_locs:
102
103
        self.logger.info(
103
104
            _('Container audit "once" mode completed: %.02fs'), elapsed)
104
105
        dump_recon_cache({'container_auditor_pass_completed': elapsed},
105
 
                         self.recon_container)
 
106
                         self.rcache, self.logger)
106
107
 
107
108
    def container_audit(self, path):
108
109
        """
112
113
        """
113
114
        start_time = time.time()
114
115
        try:
115
 
            if not path.endswith('.db'):
116
 
                return
117
116
            broker = ContainerBroker(path)
118
117
            if not broker.is_deleted():
119
118
                broker.get_info()