jina.peapods.runtimes.zmq.base

class jina.peapods.runtimes.zmq.base.ZMQRuntime(args)[source]

Bases: jina.peapods.runtimes.base.BaseRuntime, abc.ABC

cancel()[source]

Cancelling run_forever() from M. cancel() usually requires some special communication between M and S, e.g.

  • Use threading.Event or multiprocessing.Event, while run_forever() polls for this event

  • Use ZMQ to send a message, while run_forever() polls for this message

  • Use HTTP/REST to send a request, while run_forever() listens to this request

See also

run_forever() for blocking the process/thread.

property status
property is_ready
Return type

bool

class jina.peapods.runtimes.zmq.base.ZMQManyRuntime(args)[source]

Bases: jina.peapods.runtimes.base.BaseRuntime, abc.ABC

cancel()[source]

Cancelling run_forever() from M. cancel() usually requires some special communication between M and S, e.g.

  • Use threading.Event or multiprocessing.Event, while run_forever() polls for this event

  • Use ZMQ to send a message, while run_forever() polls for this message

  • Use HTTP/REST to send a request, while run_forever() listens to this request

See also

run_forever() for blocking the process/thread.

property status
property is_ready
Return type

bool