jina.peapods.runtimes.jinad package

Module contents

class jina.peapods.runtimes.jinad.JinadRuntime(args, **kwargs)[source]

Bases: jina.peapods.runtimes.zmq.asyncio.AsyncNewLoopRuntime

Runtime procedure for JinaD.

async async_setup()[source]

Create Workspace, Pea on remote JinaD server

async async_run_forever()[source]

Streams log messages using websocket from remote server

async async_cancel()[source]

Skip cancel for JinadRuntime

async async_teardown()[source]

Cancels the logstream task, removes the remote Pea

property filepaths: List[pathlib.Path]

Get file/directories to be uploaded to remote workspace

Return type



filepaths to be uploaded to remote

static cancel(cancel_event, **kwargs)[source]

Signal the runtime to terminate

  • cancel_event (Union[ForwardRef, ForwardRef]) – the cancel event to set

  • kwargs – extra keyword arguments

static activate(control_address, timeout_ctrl, socket_in_type, logger, **kwargs)[source]

Check if the runtime has successfully started

  • control_address (str) – the address where the control message needs to be sent

  • timeout_ctrl (int) – the timeout to wait for control messages to be processed

  • socket_in_type (SocketType) – the type of input socket, needed to know if is a dealer

  • logger (JinaLogger) – the JinaLogger to log messages

  • kwargs – extra keyword arguments

static get_control_address(host, port, **kwargs)[source]

Get the control address for a runtime with a given host and port

  • host (str) – the host where the runtime works

  • port (str) – the control port where the runtime listens

  • kwargs – extra keyword arguments


The corresponding control address