]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind / snap_schedule: remove 'SNAP_SCHED_TESTING' check
authorVenky Shankar <vshankar@redhat.com>
Thu, 20 Aug 2020 09:42:29 +0000 (05:42 -0400)
committerVenky Shankar <vshankar@redhat.com>
Tue, 17 Nov 2020 06:15:46 +0000 (01:15 -0500)
Next commit introduces a module option to allow minute granularity
snapshots.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/pybind/mgr/snap_schedule/fs/schedule.py

index 9b89f476e26ccbd58235419fc4e6e4651c4f36f2..d9246c1a3334fca20dbae0895e4c5500e77c8724 100644 (file)
@@ -13,10 +13,6 @@ from typing import Tuple, Any
 
 log = logging.getLogger(__name__)
 
-
-TESTING = 'SNAP_SCHED_TESTING' in environ
-
-
 # Work around missing datetime.fromisoformat for < python3.7
 SNAP_DB_TS_FORMAT = '%Y-%m-%dT%H:%M:%S'
 try:
@@ -363,7 +359,7 @@ class Schedule(object):
     def repeat(self):
         mult = self.schedule[-1]
         period = int(self.schedule[0:-1])
-        if TESTING and mult == 'M':
+        if mult == 'M':
             return period * 60
         elif mult == 'h':
             return period * 60 * 60