hi, yes, why not. You can create GenServer which will run Process.send_after/4 after he execute Task.start/1. You can have own TaskSupervisor who can manage running processes. But I think you can have some issues in future, but it depends on external API. I like idea of Mint. There is a pool of connections to every domain. So you can have one pool for your external API. You can use Finch or Tesla middleware for Finch.
You should think about and handle errors because you should take care of your task process so this new process will never crash. It can crash but it can be messy in logs when you have about 9000 requests per day. And in case external api is down for 10 minutes you don’t want to see 1_000 lines of errors. It depends what to you want to do when your process crash or you can handle it with just Logger.error…
I like Tesla because you can add Retry middleware where you can setup retry when you get network error. These errors happen because of ISP, clouds, etc… But it depends what do you want to achieve with this calls.






















