Added model policies as a thread in the observer
Sapan Bhatia [Fri, 23 Jan 2015 16:17:12 +0000 (16:17 +0000)]
planetstack/openstack_observer/backend.py

index 8e4cab3..fe623ca 100644 (file)
@@ -3,6 +3,7 @@ import time
 from observer.event_loop import PlanetStackObserver
 from observer.event_manager import EventListener
 from util.logger import Logger, logging
+from model_policy import run_policy
 
 logger = Logger(level=logging.INFO)
 
@@ -14,6 +15,10 @@ class Backend:
             observer_thread = threading.Thread(target=observer.run)
             observer_thread.start()
             
+            # start model policies thread
+            model_policy_thread = threading.Thread(target=run_policy)
+            model_policy_thread.start()
+
             # start event listene
             event_manager = EventListener(wake_up=observer.wake_up)
             event_manager_thread = threading.Thread(target=event_manager.run)