initial checkin of event listener. refactor/cleanup
diff --git a/planetstack/plstackapi-debug-server.py b/planetstack/plstackapi-debug-server.py
index a78cfe7..e120d72 100644
--- a/planetstack/plstackapi-debug-server.py
+++ b/planetstack/plstackapi-debug-server.py
@@ -1,12 +1,10 @@
#!/usr/bin/env python
import os
import sys
-import threading
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings")
-from planetstack.config import Config
-from openstack.sliveragent import SliverAgent
-from openstack.observer import OpenStackObserver
+from planetstack.config import Config
+from openstack.backend import Backend
if __name__ == '__main__':
@@ -17,16 +15,9 @@
args = [__file__, 'runserver', url]
- # start the sliver agent thread
- sliver_agent = SliverAgent()
- sliver_agent_thread = threading.Thread(target=sliver_agent.run)
- sliver_agent_thread.start()
-
- # start the openstack observer
- observer = OpenStackObserver()
- observer_thread = threading.Thread(target=observer.run)
- observer_thread.start()
-
+ backend = Backend()
+ backend.run()
+
# start the server
server = ManagementUtility(args)
server.execute()