I have an HTTP Firebase Cloud Function that occasionally can take very long to finish. For this particular use case, I don't want my users to wait until the function has finished to receive a 200
response.
So I do res.status(200).send();
as usual, but instead of doing it at the end of execution I've tried doing it at the start of the function. The problem is that this stops execution.
As a workaround I'm considering moving the heavy load to a different function and trigger it from a write in the Realtime Database, but it would be much easier to just have this logic in a single function.
Is there a way around this limitation?