DAS_2023_1/antonov_dmitry_lab4/rabbitmq/app.py

20 lines
364 B
Python
Raw Normal View History

2023-12-04 22:18:07 +04:00
from flask import Flask, render_template, request
2023-12-05 12:35:35 +04:00
from publisher import publish_messages
2023-12-04 22:18:07 +04:00
app = Flask(__name__)
@app.route('/')
def index():
2023-12-05 12:35:35 +04:00
return "это publisher"
2023-12-04 22:18:07 +04:00
@app.route('/publish', methods=['GET'])
def publish():
2023-12-05 12:35:35 +04:00
publish_messages()
return 'Начало приема пациентов'
2023-12-04 22:18:07 +04:00
if __name__ == '__main__':
app.run(debug=True)