Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for waitUntil in Supabase context #3721

Open
riderx opened this issue Dec 4, 2024 · 2 comments
Open

Add support for waitUntil in Supabase context #3721

riderx opened this issue Dec 4, 2024 · 2 comments
Labels
enhancement New feature or request.

Comments

@riderx
Copy link

riderx commented Dec 4, 2024

What is the feature you are proposing?

The feature got released yesterday: https://supabase.com/docs/guides/functions/background-tasks
it uses a new object EdgeRuntime
So we could probably test if it exists to connect waitUntil to it if it is.
this could also be used in getRuntimeKey to return Supabase as runtime

@riderx riderx added the enhancement New feature or request. label Dec 4, 2024
@riderx riderx changed the title Add support for waitUntil in supabase context Add support for waitUntil in Supabase context Dec 4, 2024
@riderx
Copy link
Author

riderx commented Dec 4, 2024

@yusukebe
Copy link
Member

yusukebe commented Dec 6, 2024

Hi @riderx

It's interesting.

Regarding waitUntil, in my opinion, we don't have to implement that c.executionCtx.waitUntil supports Supabase because you can get it from the global object EdgeRuntime. That was created for Cloudflare Workers because we can't get the waitUntil globally on Cloudflare Workers.

About a runtime key. The runtime keys are based on WinterCG spec:

https://runtime-keys.proposal.wintercg.org/

If a key like supabase for Supabase is available, we can add it to the getRuntimeKey, but currently, the spec does not have the key for Supabase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants