Giter VIP home page Giter VIP logo

Comments (21)

stdrc avatar stdrc commented on June 23, 2024

大概率是和 #22 同样的问题,可以看一下

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

OK 好的,我回去试试自己心跳(嗯我的反向 WebSocket 也是在阿里云。。)

不过自己的代码写出 bug 产生异常很容易发生,希望可以做到我的代码出问题没有 except none 有一个全局的 except 吧

from nonebot.

stdrc avatar stdrc commented on June 23, 2024

None 现在命令有全局 except

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

但是我只要是自己的插件出问题控制台报错以后 100% 出现给机器人发消息插件能收到消息但是回复消息失败……

另外就是出问题以后 Ctrl+C 退出机器人的时候错误日志会出现一次

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

换句话说,现在的全局 except 似乎只做到了没有断开 event(事件上报正常),但是 api 会断开(调用命令回复失败)

from nonebot.

stdrc avatar stdrc commented on June 23, 2024

api 连接的问题,多半是因为 #22

None 的命令处理已经捕获了所有异常,理论上不太可能在命令里出现让连接断开的情况了,总之有空你先试下那个 issue 里的解法

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

OK 好的

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

做了每分钟一次 get_status,然后稳定运行了一个多小时到今天的 3:01,3:02 开始就调用失败了……

依然是能收到事件发不出去消息

from nonebot.

stdrc avatar stdrc commented on June 23, 2024

@ImSingee NoneBot 日志里面有什么异常嘛,除了 ApiNotFound

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

我现在只能看到 ApiNotFound…… 昨天三点多的日志被刷掉了,一会我加一下日志存储吧,等再掉线了看看掉线前后时间点的日志

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

出现了掉线 没有任何错误日志
image

附:我自己完成的心跳代码
image

from nonebot.

stdrc avatar stdrc commented on June 23, 2024

唔……那么你的 NoneBot 和插件通信是走公网 IP 的吗,还是本机

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

公网……

CoolQ 运行在一台 Windows 上,None 部署在了腾讯云

from nonebot.

stdrc avatar stdrc commented on June 23, 2024

我发了个 v0.5.2,给命令、自然语言处理器、通知和请求处理器都加了全局 except,你试试看

另外还是建议 酷Q 和后端跑在同一个机器上,因为国内那些云确实会掐连接

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

OK 我再试试。。
主要是不知道为什么我的酷 Q 用 docker 非常不稳定……

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

好吧很诡异依然掉线

能否考虑支持把 api 和 event 放到一个连接的模式?因为我看 event 并不会断……

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

哎我读了一下 aiocqhttp 的源码发现支持这个…… 我去试试

from nonebot.

stdrc avatar stdrc commented on June 23, 2024

@ImSingee 嗯现在支持 Universal 客户端,两个在同一个连接上

from nonebot.

ImSingee avatar ImSingee commented on June 23, 2024

OK,换成一个连接 + Universal 稳定了

from nonebot.

miranquil avatar miranquil commented on June 23, 2024

@ImSingee 嗯现在支持 Universal 客户端,两个在同一个连接上

现在支持一个链接了?!之前看旧的issues还说不支持来着……

    "ws_reverse_url": "ws://127.0.0.1/ws/",
    "ws_reverse_use_universal_client": true,

这样么?

from nonebot.

stdrc avatar stdrc commented on June 23, 2024

@yorushika 是这样

from nonebot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.