mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-09-02 22:12:25 +08:00
fix test_send
This commit is contained in:
parent
6a8b2e2d15
commit
5217a2db9b
@ -25,9 +25,6 @@ async def do_send_msgs():
|
|||||||
if time.time() - LAST_SEND_TIME < 1.5:
|
if time.time() - LAST_SEND_TIME < 1.5:
|
||||||
return
|
return
|
||||||
if QUEUE:
|
if QUEUE:
|
||||||
import ipdb
|
|
||||||
|
|
||||||
ipdb.set_trace()
|
|
||||||
bot, user, user_type, msg, retry_time = QUEUE.pop(0)
|
bot, user, user_type, msg, retry_time = QUEUE.pop(0)
|
||||||
try:
|
try:
|
||||||
await _do_send(bot, user, user_type, msg)
|
await _do_send(bot, user, user_type, msg)
|
||||||
|
@ -46,4 +46,6 @@ async def test_send_queue(app: App):
|
|||||||
"send_group_msg", {"group_id": "1233", "message": "msg"}, True
|
"send_group_msg", {"group_id": "1233", "message": "msg"}, True
|
||||||
)
|
)
|
||||||
LAST_SEND_TIME = 0
|
LAST_SEND_TIME = 0
|
||||||
|
await asyncio.sleep(2)
|
||||||
await do_send_msgs()
|
await do_send_msgs()
|
||||||
|
assert ctx.wait_list.empty()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user