!!!Testimplementierung!!!
*API wird ausgeführt *sie starten das ems *ems startet swich
This commit is contained in:
parent
e70ef4de38
commit
59340b5fee
3 changed files with 40 additions and 24 deletions
13
scr/API.py
13
scr/API.py
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue