Django 频道睡眠

问题描述

我有两个组发送,我想在它们之间睡觉,我的代码

    await self.channel_layer.group_send(
    str(self.game_link),{
        "type": "group_message","text": json.dumps(answer_data),}
    )

    await asyncio.sleep(5)

    await self.channel_layer.group_send(
    str(self.game_link),"text": json.dumps(data),}
    )

最终发生的事情是在睡眠结束后同时发送。 我怎样才能解决这个问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)