1
0
mirror of https://github.com/janvarev/Irene-Voice-Assistant.git synced 2025-11-26 22:50:58 +02:00

v3.2 - web api

- опции запуска сервера вынесены в плагин webapi.py
- теперь сервер корректно обрабатывает таймеры (вызывает _update_timers)
This commit is contained in:
janvarev
2022-02-08 12:06:07 +03:00
parent a23f3edb4d
commit 5545ac33d0
4 changed files with 60 additions and 2 deletions

30
plugins/webapi.py Normal file
View File

@@ -0,0 +1,30 @@
# Webapi settings
# author: Vladislav Janvarev
import os
from vacore import VACore
modname = os.path.basename(__file__)[:-3] # calculating modname
# функция на старте
def start(core:VACore):
manifest = {
"name": "Webapi options",
"version": "1.0",
"require_online": False,
"default_options": {
"host": "127.0.0.1",
"port": 5003,
"log_level": "info"
},
}
return manifest
def start_with_options(core:VACore, manifest:dict):
pass