Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving from a lifecycle hook to event for model download
The lifecycle hook would get blocked if you used WaitFor on the model resource, as it wouldn't fire until the model was healthy, which it couldn't achieve. Refactored to use an event instead that relies on the server resource ready event. Had to turn the event into a non-blocking with Task.Run otherwise models couldn't be downloaded concurrently, as the events would run one at a time, waiting for model download completion before continuing on. Also took this time to refactor the AddModel method to have a few extension methods, making it a bit clearer as to what happens when. Fixes #256
- Loading branch information