I’m running batches of short-lived fire and forget tasks (I sometimes receive feedback from them).
I can kill the tasks from within themselves… but was hoping to use the supervisor to kill long-running
tasks for me?
I’ve tried variants of the commented options, but have yet to find a way to get them to actually timeout and die .
Am I missing some basic setting or concept here?
def work(some_values) do Task.Supervisor.async_stream_nolink( MyApp.TaskSupervisor, some_values, fn v -> do_something(v) end, ordered: false, # timeout: 50 # shutdown: 50, # on_timeout: :kill_task ) end