dse-assignment/components/orchestration/orchestration_server.py

28 lines
450 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, args=('0.0.0.0', 5003)).start()