update
This commit is contained in:
parent
82e64eb839
commit
cf50483227
4
test.py
4
test.py
|
@ -43,12 +43,12 @@ async def close(username, device):
|
||||||
# 倒计时600秒
|
# 倒计时600秒
|
||||||
await asyncio.sleep(40)
|
await asyncio.sleep(40)
|
||||||
user_sched.pop(username)
|
user_sched.pop(username)
|
||||||
print("结束推流")
|
print(username + "结束推流")
|
||||||
close_stream(username, device)
|
close_stream(username, device)
|
||||||
|
|
||||||
|
|
||||||
async def task_start(username, device):
|
async def task_start(username, device):
|
||||||
print("开始推流")
|
print(username + "开始推流")
|
||||||
push_stream(username, device)
|
push_stream(username, device)
|
||||||
task = asyncio.create_task(close(username, device))
|
task = asyncio.create_task(close(username, device))
|
||||||
user_sched[username] = task
|
user_sched[username] = task
|
||||||
|
|
Loading…
Reference in New Issue