Closed Adzz closed 1 year ago
That's a pretty good idea. We should let caller specify which task supervisor the task should run under.
Hello @Adzz, I love the change.
I think the only things left are tests and adding documentation to functions explaining how we can override the default supervisor.
Great stuff I'll add that now.
@AndrewDryga I have added a test and some docs, please let me know if you have any suggestions.
@Adzz don't worry about docs formatting, LGTM. I'll slightly edit them and release a new version. Thank you ❤️
Sounds good thanks for the quick feedback!
Imagine an app called Blog that uses Sage.
Currently Sage allows async steps that spin up a task supervised under
Sage.AsyncTransactionSupervisor
. Because Sage is a dep of Blog, on shutdown Blog will shutdown before Sage does.That means if an async step interacts with a process under Blog's supervision tree and you are using some sort of rolling deploy you can enter the following scenario:
Possible Solutions
This PR does 2.