]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Switch over to FixedIntervalLoopingCall
authorDirk Mueller <dirk@dmllr.de>
Mon, 14 Apr 2014 15:12:23 +0000 (17:12 +0200)
committerDirk Mueller <dirk@dmllr.de>
Mon, 14 Apr 2014 15:12:23 +0000 (17:12 +0200)
Change-Id: Iebe5269ea01acdd4ba011742831ca5e569f66b28
Closes-Bug: #1307560

cinder/service.py
cinder/volume/drivers/ibm/storwize_svc/__init__.py

index 811a6c8cff1353f8f18254b89ffe5fa11737645e..7d0d5717123786099a411c633a2530c3c73ef074 100755 (executable)
@@ -119,7 +119,8 @@ class Service(service.Service):
         self.rpcserver.start()
 
         if self.report_interval:
-            pulse = loopingcall.LoopingCall(self.report_state)
+            pulse = loopingcall.FixedIntervalLoopingCall(
+                self.report_state)
             pulse.start(interval=self.report_interval,
                         initial_delay=self.report_interval)
             self.timers.append(pulse)
@@ -130,7 +131,8 @@ class Service(service.Service):
             else:
                 initial_delay = None
 
-            periodic = loopingcall.LoopingCall(self.periodic_tasks)
+            periodic = loopingcall.FixedIntervalLoopingCall(
+                self.periodic_tasks)
             periodic.start(interval=self.periodic_interval,
                            initial_delay=initial_delay)
             self.timers.append(periodic)
index eb0f589556671d6dc6a7aeab2317899cdbb5fc6d..6f6cee27c3097b4ae28e15bdc06c3a8df0a59e59 100644 (file)
@@ -207,7 +207,7 @@ class StorwizeSVCDriver(san.SanDriver):
 
         # if vdiskcopy exists in database, start the looping call
         if len(self._vdiskcopyops) >= 1:
-            self._vdiskcopyops_loop = loopingcall.LoopingCall(
+            self._vdiskcopyops_loop = loopingcall.FixedIntervalLoopingCall(
                 self._check_volume_copy_ops)
             self._vdiskcopyops_loop.start(interval=self.VDISKCOPYOPS_INTERVAL)
 
@@ -567,7 +567,7 @@ class StorwizeSVCDriver(san.SanDriver):
 
         # We added the first copy operation, so start the looping call
         if len(self._vdiskcopyops) == 1:
-            self._vdiskcopyops_loop = loopingcall.LoopingCall(
+            self._vdiskcopyops_loop = loopingcall.FixedIntervalLoopingCall(
                 self._check_volume_copy_ops)
             self._vdiskcopyops_loop.start(interval=self.VDISKCOPYOPS_INTERVAL)