This commit is contained in:
xyj 2024-01-02 12:01:00 +08:00
parent 072386c241
commit 82e64eb839
1 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ user_sched = {}
async def close(username, device):
# 倒计时600秒
await asyncio.sleep(600)
await asyncio.sleep(40)
user_sched.pop(username)
print("结束推流")
close_stream(username, device)
@ -63,7 +63,7 @@ async def startup(username, device):
t = user_sched[username]
# 取消重来
t.cancel()
await task_start()
await task_start(username, device)
except:
pass
@ -91,4 +91,4 @@ def close_stream(username, device):
if __name__ == '__main__':
broker = 'mqtt.lihaink.cn'
port = 1883
uvicorn.run(app, host="127.0.0.1", port=8002)
uvicorn.run(app, host="127.0.0.1", port=8001)