update
This commit is contained in:
parent
d9221df692
commit
5beb69024d
6
test.py
6
test.py
|
@ -43,12 +43,12 @@ async def close(username, device):
|
|||
# 倒计时600秒
|
||||
await asyncio.sleep(600)
|
||||
user_sched.pop(username)
|
||||
print(username + "结束推流")
|
||||
# print(username + "结束推流")
|
||||
close_stream(username, device)
|
||||
|
||||
|
||||
async def task_start(username, device):
|
||||
print(username + "开始推流")
|
||||
# print(username + "开始推流")
|
||||
push_stream(username, device)
|
||||
task = asyncio.create_task(close(username, device))
|
||||
user_sched[username] = task
|
||||
|
@ -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=8001)
|
||||
uvicorn.run(app, host="0.0.0.0", port=8001)
|
||||
|
|
Loading…
Reference in New Issue