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

« back to all changes in this revision

Viewing changes to swift/account/reaper.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 random
 
18
from gettext import gettext as _
18
19
from logging import DEBUG
19
20
from math import sqrt
20
21
from time import time, ctime
76
77
        self.reap_not_done_after = reap_warn_after + self.delay_reaping
77
78
 
78
79
    def get_account_ring(self):
79
 
        """ The account :class:`swift.common.ring.Ring` for the cluster. """
 
80
        """The account :class:`swift.common.ring.Ring` for the cluster."""
80
81
        if not self.account_ring:
81
82
            self.account_ring = Ring(self.swift_dir, ring_name='account')
82
83
        return self.account_ring
83
84
 
84
85
    def get_container_ring(self):
85
 
        """ The container :class:`swift.common.ring.Ring` for the cluster. """
 
86
        """The container :class:`swift.common.ring.Ring` for the cluster."""
86
87
        if not self.container_ring:
87
88
            self.container_ring = Ring(self.swift_dir, ring_name='container')
88
89
        return self.container_ring
89
90
 
90
91
    def get_object_ring(self):
91
 
        """ The object :class:`swift.common.ring.Ring` for the cluster. """
 
92
        """The object :class:`swift.common.ring.Ring` for the cluster."""
92
93
        if not self.object_ring:
93
94
            self.object_ring = Ring(self.swift_dir, ring_name='object')
94
95
        return self.object_ring
95
96
 
96
97
    def run_forever(self, *args, **kwargs):
97
 
        """
98
 
        Main entry point when running the reaper in its normal daemon mode.
 
98
        """Main entry point when running the reaper in normal daemon mode.
 
99
 
99
100
        This repeatedly calls :func:`reap_once` no quicker than the
100
101
        configuration interval.
101
102
        """