update
This commit is contained in:
parent
072386c241
commit
82e64eb839
6
test.py
6
test.py
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue