mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-22 16:46:29 +00:00
Cleanup shutdown (#2025)
This commit is contained in:
parent
2321890dde
commit
5052a339e3
@ -43,6 +43,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
# Install Python dependencies from requirements.txt if it exists
|
# Install Python dependencies from requirements.txt if it exists
|
||||||
COPY requirements.txt requirements_tests.txt ./
|
COPY requirements.txt requirements_tests.txt ./
|
||||||
RUN pip3 install -r requirements.txt -r requirements_tests.txt \
|
RUN pip3 install -U setuptools pip \
|
||||||
|
&& pip3 install -r requirements.txt -r requirements_tests.txt \
|
||||||
&& pip3 install tox \
|
&& pip3 install tox \
|
||||||
&& rm -f requirements.txt requirements_tests.txt
|
&& rm -f requirements.txt requirements_tests.txt
|
||||||
|
@ -5,7 +5,6 @@ import logging
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from supervisor import bootstrap
|
from supervisor import bootstrap
|
||||||
from supervisor.const import CoreState
|
|
||||||
|
|
||||||
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -54,10 +53,6 @@ if __name__ == "__main__":
|
|||||||
_LOGGER.info("Run Supervisor")
|
_LOGGER.info("Run Supervisor")
|
||||||
loop.run_forever()
|
loop.run_forever()
|
||||||
finally:
|
finally:
|
||||||
if coresys.core.state != CoreState.CLOSE:
|
|
||||||
_LOGGER.info("Stopping Supervisor")
|
|
||||||
loop.run_until_complete(coresys.core.stop())
|
|
||||||
executor.shutdown(wait=False)
|
|
||||||
loop.close()
|
loop.close()
|
||||||
|
|
||||||
_LOGGER.info("Close Supervisor")
|
_LOGGER.info("Close Supervisor")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user