Is it possible to run submission-created as a background function?

I’m currently facing some minor issues with a site because a function that talks to a newsletter service is timing out after 10s. This is caused by the newsletter API. Like me, it has a bit of trouble waking up sometimes. The function is triggered automatically on a Netlify form submit, so obviously it’s named submission-created.js.

Long story short: Is it possible to rename the function to submission-created-background.js to make use of both the automatic trigger and the background functionality?

hmm, this seems like a valid question. I don’t have an answer for you, but do note that if you can’t make it work, we can definitely bump up your function timeout with us (as a Pilot you definitely get that perk) to 26 seconds. Let me know!

That would be great for the meanwhile @perry ! The sites ID is 53f01798-aa5e-43bf-8154-02dd2fd7c691. :raised_hands:

If it turns out that what I’m asking isn’t possible, you may consider this a feature request :upside_down_face:

hey tom! we bumped you up to 26 seconds, you are good to go. Keep us posted!

1 Like