]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/mgr_module:delete invalid judgment 41781/head
authordengchl01 <dengchl01@inspur.com>
Wed, 9 Jun 2021 08:59:51 +0000 (16:59 +0800)
committerdengchl01 <dengchl01@inspur.com>
Wed, 9 Jun 2021 08:59:51 +0000 (16:59 +0800)
Signed-off-by: dengchl01 <dengchl01@inspur.com>
src/pybind/mgr/diskprediction_local/module.py

index f839ead7d7dc56e5da8b0cfca081b4f807615de7..ce1e8836f3229d1f7d407b699ea657af704cdb24 100644 (file)
@@ -92,13 +92,9 @@ class Module(MgrModule):
                     seconds -= seconds % predicted_frequency
                     seconds += predicted_frequency
                     next_predicted = datetime.datetime.utcfromtimestamp(seconds)
-                    if last_predicted:
-                        self.log.debug('Last scrape %s, next scrape due %s',
-                                       last_predicted.strftime(TIME_FORMAT),
-                                       next_predicted.strftime(TIME_FORMAT))
-                    else:
-                        self.log.debug('Last scrape never, next scrape due %s',
-                                       next_predicted.strftime(TIME_FORMAT))
+                    self.log.debug('Last scrape %s, next scrape due %s',
+                                   last_predicted.strftime(TIME_FORMAT),
+                                   next_predicted.strftime(TIME_FORMAT))
                 if now >= next_predicted:
                     self.predict_all_devices()
                     last_predicted = now