1
0
mirror of https://github.com/ijaric/voice_assistant.git synced 2026-04-06 04:09:38 +00:00

feat: new file structure

This commit is contained in:
Artem Litvinov
2023-10-03 21:29:55 +01:00
parent eab9177c00
commit 89660d1ac7
110 changed files with 2785 additions and 7 deletions

View File

View File

@@ -0,0 +1,37 @@
import asyncio
import logging
import os
import lib.app as app
logger = logging.getLogger(__name__)
async def run() -> None:
settings = app.Settings()
application = app.Application.from_settings(settings)
try:
await application.start()
finally:
await application.dispose()
def main() -> None:
try:
asyncio.run(run())
exit(os.EX_OK)
except SystemExit:
exit(os.EX_OK)
except app.ApplicationError:
exit(os.EX_SOFTWARE)
except KeyboardInterrupt:
logger.info("Exited with keyboard interruption")
exit(os.EX_OK)
except BaseException:
logger.exception("Unexpected error occurred")
exit(os.EX_SOFTWARE)
if __name__ == "__main__":
main()