Test shutdown.
This commit is contained in:
parent
e6f7261d67
commit
7bf3cd13a7
@ -7,7 +7,6 @@ ENV PIP_BREAK_SYSTEM_PACKAGES 1
|
||||
RUN pip install flask-restx==1.3.0
|
||||
WORKDIR /root
|
||||
COPY thermostat.py /root/
|
||||
COPY entrypoint.sh /root/
|
||||
ENV FLASK_APP thermostat.py
|
||||
STOPSIGNAL SIGINT
|
||||
ENTRYPOINT ["/root/entrypoint.sh"]
|
||||
ENTRYPOINT ["/root/thermostat.py"]
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec flask run
|
@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
from flask import Flask, request
|
||||
from flask_restx import Api, Resource, fields
|
||||
from functools import wraps
|
||||
@ -383,6 +384,8 @@ def thermostat_loop():
|
||||
time.sleep(load_shedder_interval)
|
||||
logging.info("====== Ended successfully ======")
|
||||
|
||||
if __name__ == '__main__':
|
||||
#t1 = Thread(target=thermostat_loop)
|
||||
#t1.daemon = True
|
||||
#t1.start()
|
||||
app.run(host='0.0.0.0')
|
||||
|
Loading…
Reference in New Issue
Block a user