Cleanup shutdown (#2025)

This commit is contained in:
Pascal Vizeli 2020-09-07 18:45:22 +02:00 committed by GitHub
parent 2321890dde
commit 5052a339e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -43,6 +43,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Install Python dependencies from requirements.txt if it exists
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 \
&& rm -f requirements.txt requirements_tests.txt

View File

@ -5,7 +5,6 @@ import logging
import sys
from supervisor import bootstrap
from supervisor.const import CoreState
_LOGGER: logging.Logger = logging.getLogger(__name__)
@ -54,10 +53,6 @@ if __name__ == "__main__":
_LOGGER.info("Run Supervisor")
loop.run_forever()
finally:
if coresys.core.state != CoreState.CLOSE:
_LOGGER.info("Stopping Supervisor")
loop.run_until_complete(coresys.core.stop())
executor.shutdown(wait=False)
loop.close()
_LOGGER.info("Close Supervisor")