dse-assignment/components/orchestration/orchestration_server.py
Marco Zeisler 349a38fa9f vehicle sends daf to orchestrator via rabbitMQ broker
vehicle receives new target velocity from orchestrator as response;
at this point, this velocity is just a random float between 0 and 130;
2021-05-24 17:17:50 +02:00

28 lines
426 B
Python

import threading
from flask import Flask
from orchestrator import Orchestrator
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World'
@app.route('/api1')
def api1():
return 'api1'
@app.route('/api2')
def api2():
return 'api2'
if __name__ == '__main__':
orc = Orchestrator()
threading.Thread(target=orc.setup_msg_queues).start()
threading.Thread(target=app.run).start()