You've already forked Irene-Voice-Assistant
mirror of
https://github.com/janvarev/Irene-Voice-Assistant.git
synced 2025-12-05 23:08:23 +02:00
6.3 - фикс в webapi - апдейт таймеров теперь вызывается нерекурсивно
This commit is contained in:
@@ -195,10 +195,8 @@ async def replyWasGiven():
|
|||||||
#print("debug - run context after webapi call")
|
#print("debug - run context after webapi call")
|
||||||
|
|
||||||
def core_update_timers_http(runReq=True):
|
def core_update_timers_http(runReq=True):
|
||||||
if not is_running:
|
time.sleep(5) # small sleep before start
|
||||||
return
|
while is_running:
|
||||||
|
|
||||||
if runReq:
|
|
||||||
try:
|
try:
|
||||||
import requests
|
import requests
|
||||||
if webapi_options["use_ssl"]:
|
if webapi_options["use_ssl"]:
|
||||||
@@ -209,11 +207,14 @@ def core_update_timers_http(runReq=True):
|
|||||||
r = requests.get(reqstr,verify=False)
|
r = requests.get(reqstr,verify=False)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
try:
|
|
||||||
time.sleep(2)
|
try:
|
||||||
except:
|
time.sleep(2)
|
||||||
return
|
except:
|
||||||
core_update_timers_http()
|
return
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("shutdown")
|
@app.on_event("shutdown")
|
||||||
def app_shutdown():
|
def app_shutdown():
|
||||||
|
|||||||
Reference in New Issue
Block a user