Make sure non-blocking function can actually complete
I have a SvelteKit API route in this pattern:
How do I make sure that
somethingElse (which makes an async HTTP request) actually completes? This pattern works in local dev, but in the runtime it seems to work only intermittently. How can I keep somethingElse non-blocking while still making sure it actually finishes?2 Replies
You need to use
waitUntil
I think the code would roughly be something like
solved, I had to use destructured platform and .context.waitUntil