Test shutdown.

This commit is contained in:
yohan 2024-06-07 01:46:51 +02:00
parent 2d3c87fd75
commit 17aaa750e9
2 changed files with 2 additions and 1 deletions

View File

@ -8,4 +8,4 @@ RUN pip install flask-restx==1.3.0
WORKDIR /root WORKDIR /root
COPY thermostat.py /root/ COPY thermostat.py /root/
ENV FLASK_APP thermostat.py ENV FLASK_APP thermostat.py
ENTRYPOINT ["/usr/bin/gunicorn", "thermostat:app"] ENTRYPOINT ["/usr/bin/gunicorn", "thermostat:gunicorn_app"]

View File

@ -388,6 +388,7 @@ xprint('toto')
t1 = Thread(target=thermostat_loop) t1 = Thread(target=thermostat_loop)
#t1.daemon = True #t1.daemon = True
t1.start() t1.start()
gunicorn_app = app
t1.join() t1.join()
exit(0) exit(0)
# app.run(host='0.0.0.0', port=3002) # app.run(host='0.0.0.0', port=3002)