123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import os
- import sys
- from flask import Flask
- sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
- from multiprocessing import Process,Queue
- from format_convert.convert import _convert
- from format_convert.utils import get_ip_port
- ip_port_dict = get_ip_port()
- ip = "http://127.0.0.1"
- convert_port_list = ip_port_dict.get(ip).get("convert")
- ocr_port_list = ip_port_dict.get(ip).get("ocr")
- otr_port_list = ip_port_dict.get(ip).get("otr")
- attachment_queue = Queue()
- class A:
- def __init__(self):
- print(A)
- a = A()
- def convert_start_mp():
- pass
- app = Flask(__name__)
- @app.route('/test', methods=['POST'])
- def test():
- print(str(attachment_queue))
- print(str(a))
- attachment_queue.put(1)
- print(attachment_queue.qsize())
- if __name__ == '__main__':
- # app.run(host='0.0.0.0', port=15011, processes=3, threaded=False, debug=False)
- app.run()
|