From: dengchl01 Date: Wed, 9 Jun 2021 08:59:51 +0000 (+0800) Subject: mgr/mgr_module:delete invalid judgment X-Git-Tag: v17.1.0~1671^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=70c6a1dba01ada451d0e37eae86f976e7619cf75;p=ceph.git mgr/mgr_module:delete invalid judgment Signed-off-by: dengchl01 --- diff --git a/src/pybind/mgr/diskprediction_local/module.py b/src/pybind/mgr/diskprediction_local/module.py index f839ead7d7d..ce1e8836f32 100644 --- a/src/pybind/mgr/diskprediction_local/module.py +++ b/src/pybind/mgr/diskprediction_local/module.py @@ -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