Added DE Background Scheduler w/ model sync jobs
In this changeset, I implemented a background scheduler service for Watcher and more particularly for the Decision Engine where I made it create 2 types of job per cluster data model collector plugin: - An initial job that is asynchronously executed upon starting the Decision Engine - A periodical job that gets triggered every configurable interval of time Change-Id: I3f5442f81933a19565217b894bd86c186e339762 Partially-Implements: bluprint cluster-model-objects-wrapper
This commit is contained in:
@@ -40,6 +40,7 @@ import abc
|
||||
import six
|
||||
|
||||
from watcher.common import clients
|
||||
from watcher.common import exception
|
||||
from watcher.common.loader import loadable
|
||||
from watcher.common import utils
|
||||
from watcher.decision_engine.loading import default as loading
|
||||
@@ -176,6 +177,9 @@ class BaseStrategy(loadable.Loadable):
|
||||
'compute', osc=self.osc)
|
||||
self._compute_model = collector.get_latest_cluster_data_model()
|
||||
|
||||
if not self._compute_model:
|
||||
raise exception.ClusterStateNotDefined()
|
||||
|
||||
return self._compute_model
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user