You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you very much for sharing this example with Cloudflare Workers, it is a great start for building interaction-based apps.
Now, sometimes we may need to do additional operations in our command, which would exceed the limit of 3 seconds for an interaction response. To prevent the interaction from failing, we can defer it by sending a deferred channel message with source payload and then we can do our asynchronous magic under the hood and edit the response when we're ready.
Sadly, Cloudflare seems to stop any further asynchronous action after a response has been sent.
So, do you have any idea about how to defer an interaction or is it just not possible?
Thank you so much!
The text was updated successfully, but these errors were encountered:
For anyone wondering, I solved this problem by using context.waitUntil(). Would love to see an example of this pretty common use case in the repository!
First of all, thank you very much for sharing this example with Cloudflare Workers, it is a great start for building interaction-based apps.
Now, sometimes we may need to do additional operations in our command, which would exceed the limit of 3 seconds for an interaction response. To prevent the interaction from failing, we can defer it by sending a deferred channel message with source payload and then we can do our asynchronous magic under the hood and edit the response when we're ready.
Sadly, Cloudflare seems to stop any further asynchronous action after a response has been sent.
So, do you have any idea about how to defer an interaction or is it just not possible?
Thank you so much!
The text was updated successfully, but these errors were encountered: