GithubHelp home page GithubHelp logo

deno_feishu_bot_echo's Issues

[Bug]: 飞书响应超时导致消息事件错乱

作者您好!

我发现飞书目前有个响应 1s 限时,如果超时,将会多次重发,导致消息莫名奇妙地被发送多次,原文如下:

收到此请求后,需要在1秒内以 HTTP 200状态码 响应该请求,否则飞书开放平台会视此次推送失败并以5s、5m、1h、6h的间隔重新推送事件,最多重试4次。

我想解决方案应该是减少同步代码,先返回响应,再执行任务代码。考虑到 Worker 的运行机制,我一开始以为需要两个 Worker 才能解决这个问题,后面找着找着发现了 ExtendableEvent.waitUntil() 方法能够等待异步代码.

遗憾的是 Deno deploy 目前还不支持这个方法,所以提出这个问题,等支持后应该就可以修复啦,原文如下:

The waitUntil() method will be supported in future to execute code after returning a response.

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.