jina.orchestrate.pods package#
Submodules#
Module contents#
- class jina.orchestrate.pods.BasePod(args)[source]#
Bases:
ABC
BasePod
is an interface from which all the classes managing the lifetime of a Runtime inside a local process, container or in a remote JinaD instance (to come) must inherit.It exposes the required APIs so that the BasePod can be handled by the cli api as a context manager or by a Deployment.
What makes a BasePod a BasePod is that it manages the lifecycle of a Runtime (gateway or not gateway)
- close()[source]#
Close the Pod
This method makes sure that the Process/thread is properly finished and its resources properly released
- Return type
None
- wait_start_success()[source]#
Block until all pods starts successfully.
If not success, it will raise an error hoping the outer function to catch it
- async async_wait_start_success()[source]#
Wait for the Pod to start successfully in a non-blocking manner
- property role: PodRoleType#
Get the role of this pod in a deployment .. #noqa: DAR201
- Return type
- class jina.orchestrate.pods.Pod(args)[source]#
Bases:
BasePod
Pod
is a thread/process- container ofBaseRuntime
. It leveragesthreading.Thread
ormultiprocessing.Process
to manage the lifecycle of aBaseRuntime
object in a robust way.A
Pod
must be equipped with a properRuntime
class to work.