🐛 fix 通道类回调函数在进程间传递时无法序列号的问题

This commit is contained in:
远野千束 2024-08-10 22:27:42 +08:00
parent 7107d03b72
commit 2f8999b5ad
2 changed files with 11 additions and 11 deletions

View File

@ -51,7 +51,7 @@ async def _():
nbp_chan.send("send by main")
@mbp_chan.on_receive()
@nbp_chan.on_receive()
async def _(data):
print("主进程收到数据", data)
# @mbp_chan.on_receive()
# @nbp_chan.on_receive()
# async def _(data):
# print("主进程收到数据", data)

View File

@ -18,10 +18,10 @@ __plugin_meta__ = PluginMetadata(
}
)
chan = get_channel("nonebot-passive")
@chan.on_receive()
async def _(d):
print("CRT子进程接收到数据", d)
chan.send("CRT子进程已接收到数据")
# chan = get_channel("nonebot-passive")
#
#
# @chan.on_receive()
# async def _(d):
# print("CRT子进程接收到数据", d)
# chan.send("CRT子进程已接收到数据")