Is there a way to call a function after an API call has been completed? I have a content-type locations
that once posted will look up weather data and add 365 rows to another content-type weather-logs
. Currently, I have the weather-logs
query and population in the locations
controller, but this means that the POST request to locations
takes upwards of 5 seconds due to the weather-logs
population requiring querying an external API. Ideally I’d be able to return the response from the POST request immediately and make the weather-logs
process asynchronous from the original POST request. Is this possible?
This topic has been created from a Discord post (1236378343583252581) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord