Use SIGINT signal for podman stop.
This commit is contained in:
parent
e7b3115a16
commit
1ac6521182
@ -9,4 +9,5 @@ WORKDIR /root
|
|||||||
COPY thermostat.py /root/
|
COPY thermostat.py /root/
|
||||||
COPY entrypoint.sh /root/
|
COPY entrypoint.sh /root/
|
||||||
ENV FLASK_APP thermostat.py
|
ENV FLASK_APP thermostat.py
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
ENTRYPOINT ["/root/entrypoint.sh"]
|
ENTRYPOINT ["/root/entrypoint.sh"]
|
||||||
|
@ -381,10 +381,8 @@ def thermostat_loop():
|
|||||||
else:
|
else:
|
||||||
logging.debug("Relay already off.")
|
logging.debug("Relay already off.")
|
||||||
time.sleep(load_shedder_interval)
|
time.sleep(load_shedder_interval)
|
||||||
|
logging.info("====== Ended successfully ======")
|
||||||
|
|
||||||
t1 = Thread(target=thermostat_loop)
|
t1 = Thread(target=thermostat_loop)
|
||||||
t1.daemon = True
|
t1.daemon = True
|
||||||
t1.start()
|
t1.start()
|
||||||
|
|
||||||
dbconn.close()
|
|
||||||
logging.info("====== Ended successfully ======")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user