blob: 2f4aa71644e702f0adabddf41a2dc21747de802e [file] [log] [blame]
Tony Mack79a49c82013-06-15 23:51:57 -04001import threading
Tony Mack79a49c82013-06-15 23:51:57 -04002from openstack.observer import OpenStackObserver
Sapan Bhatia66f4e612013-07-02 12:12:38 -04003from openstack.event_manager import EventListener
Tony Mack79a49c82013-06-15 23:51:57 -04004
5class Backend:
6
7 def run(self):
8 # start the openstack observer
9 observer = OpenStackObserver()
10 observer_thread = threading.Thread(target=observer.run)
11 observer_thread.start()
12
13 # start event listene
Sapan Bhatia66f4e612013-07-02 12:12:38 -040014 event_manager = EventListener(wake_up=observer.wake_up)
15 event_manager_thread = threading.Thread(target=event_manager.run)
16 event_manager_thread.start()
Tony Mack79a49c82013-06-15 23:51:57 -040017