Watcher Planner Selector

This component is responsible for selecting an appropriate Planner based
on predefined property value passed to concrete Strategy.

Change-Id: I86de95886df5d7e9558512569601e9ea3babb0e9
Implements: bp watcher-planner-selector
Co-Authored-By: Canwei Li <li.canwei2@zte.com.cn>
This commit is contained in:
Egor Panfilov
2018-04-22 22:18:13 +03:00
committed by licanwei
parent 7d1b179d32
commit aa2a084d22
7 changed files with 47 additions and 27 deletions

View File

@@ -94,7 +94,8 @@ class ContinuousAuditHandler(base.AuditHandler):
plan.save()
return solution
def _next_cron_time(self, audit):
@staticmethod
def _next_cron_time(audit):
if utils.is_cron_like(audit.interval):
return croniter(audit.interval, datetime.datetime.utcnow()
).get_next(datetime.datetime)