I am creating a program in Python that listens to varios user interactions and logs them. I have these requirements/restrictions:
- I need a separate process that sends those logs to a remote database every hour
- I can't do it in the current process because it blocks the UI.
- If the main process stops, the background process should also stop.
I've been reading about subprocess
but I can't seem to find anything on how to stop both simultaneously. I need the equivalent of spawn_link
if anybody know some Erlang/Elixir.
Thanks!