Tony Mack | 79a49c8 | 2013-06-15 23:51:57 -0400 | [diff] [blame] | 1 | import threading |
Tony Mack | 79a49c8 | 2013-06-15 23:51:57 -0400 | [diff] [blame] | 2 | from openstack.observer import OpenStackObserver |
| 3 | from openstack.event_listener import EventListener |
| 4 | |
| 5 | class 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 |
| 14 | event_listener = EventListener() |
| 15 | event_listener_thread = threading.Thread(target=event_listener.run) |
| 16 | event_listener_thread.start() |
| 17 | |