Run function after api is done running
Options
Kevin Wasie
Member ✭
I have some image manipulation that needs to happen. It's a heavy load that involves external API's.
I want to run a function every time a new row is added to a table.
I know I can do this with tasks, based on a repeat interval and just keep checking for new records over and over.
But, is there a way to run a function after every row is added?
Or, after an API call has already been sent back to the client?
I don't want the client to have to wait for the response.
I want to run a function every time a new row is added to a table.
I know I can do this with tasks, based on a repeat interval and just keep checking for new records over and over.
But, is there a way to run a function after every row is added?
Or, after an API call has already been sent back to the client?
I don't want the client to have to wait for the response.
Comments
-
Yes, you could add that function at the end of the function stack where that record is added. So when the record is added then your other logic is automatically triggered
-
Clarification ... I want the function to run after the response has already been sent back to the client.
I do not want the client to have to wait on the manipulation.
So, I want to run an API, send the response, and then run the function. -
Ah got it, then yes you would need to run this logic in a background task.
-
is it possible for the first API to send a webhook to trigger the function after it has completed its run?
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback