diff --git a/test.py b/test.py index 4a7b03c..6950f0e 100644 --- a/test.py +++ b/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)