live/pipeline: Propagate loading state upwards#798
Conversation
Do so by allowing upate_params to return a taskthat will do the long reload in background.
18da5f9 to
f284fbe
Compare
Just in case os.exit fails (thats a possibility in python off course)
|
Link with INF-297 |
|
|
||
| with self.pipeline_ready_time.get_lock(): | ||
| self.pipeline_ready_time.value = time.time() | ||
| self.pipeline_ready.set() |
There was a problem hiding this comment.
Since pipeline_ready is set outside of the lock for pipeline_ready_time then I guess there is a very small chance of them not being set together, but glancing through the usage here, the risk seems minimal
There was a problem hiding this comment.
Yeah and since we always check pipeline_ready before checking the time, we only need to make sure that we only set the flag after having set the time which is what we do here. Unless there's a crazy race condition of going true->false->true but I think that's unrealistic, and I can't think of a big impact even then.
Another alternative would be using the pipeline_ready_time itself as the flag for "is ready", setting it to 0 when not ready. I tried that first but thought the code was less clear so preferred the "split" approach anyway.
This is to propagate the state of when the pipeline process is reloading the pipeline.
This is mainly useful for when the stream ends, where we reload the default params again.
In case these default params require a reload, this will now make sure that the Orchestrator
will not accept any streams while that reload is happening.
This is the main PR for INF-297