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 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 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 leveragesmultiprocessing.Process
to manage the lifecycle of aBaseRuntime
object in a robust way.A
Pod
must be equipped with a properRuntime
class to work.- start()[source]#
Start the Pod. This method calls
start()
inmultiprocesssing.Process
. .. #noqa: DAR201
- join(*args, **kwargs)[source]#
Joins the Pod. This method calls
join()
inmultiprocesssing.Process
.- Parameters:
args – extra positional arguments to pass to join
kwargs – extra keyword arguments to pass to join
- async async_wait_start_success()#
Wait for the Pod to start successfully in a non-blocking manner
- close()#
Close the Pod
This method makes sure that the Process is properly finished and its resources properly released
- Return type:
None
- property role: PodRoleType#
Get the role of this pod in a deployment .. #noqa: DAR201
- Return type:
- wait_start_success()#
Block until all pods starts successfully.
If not success, it will raise an error hoping the outer function to catch it