!!!Testimplementierung!!!

*API wird ausgeführt
*sie starten das ems
*ems startet swich
This commit is contained in:
Philipp Rauch 2013-11-21 18:13:36 +01:00
parent e70ef4de38
commit 59340b5fee
3 changed files with 40 additions and 24 deletions

View file

@ -149,10 +149,10 @@ class Buffer(object):
#ToDo
None
class API(Thread):
class API(object):
def __init__(self):
Thread.__init__(self)
# Thread.__init__(self)
self.app = Flask(__name__)
### ADD URL RULES ###
@ -197,3 +197,12 @@ def get_catch_all(path):
else:
out = buf.get_level(l)
return jsonify( out )
def start():
api = API()
api.app.run(host = conf['flask_server'], port = int(conf['flask_port']), debug = conf['flask_debug'])
emsthread = ems.ems(buf)
print 'EMS-Thread:\t', emsthread
print '\tAPI:\t', buf
start()