jina.peapods.runtimes.zmq.zed

class jina.peapods.runtimes.zmq.zed.ZEDRuntime(args)[source]

Bases: jina.peapods.runtimes.zmq.base.ZMQRuntime

run_forever()[source]

Running the blocking procedure inside S. Note, once this method is called, S is blocked.

Note

If this method raises any exception, teardown() will be called.

See also

cancel() for cancelling the forever loop.

setup()[source]

Method called to prepare the runtime inside S. Optional in subclasses. The default implementation does nothing.

Note

If this method raises any exception, then run_forever() and teardown() won’t be called.

Note

Unlike __init__() called in M, setup() is called inside S.

teardown()[source]

Method called immediately after run_forever() is unblocked. You can tidy up things here. Optional in subclasses. The default implementation does nothing.

Note

This method will only be called if the setup() succeeds.

property is_idle

Return True when current time is max_idle_time seconds late than the last active time

Return type

bool

property request

Get the current request body inside the protobuf message

Return type

Request

property message

Get the current protobuf message to be processed

Return type

Message

property request_type

Get the type of message being processed

Return type

str

property expect_parts

The expected number of partial messages before trigger handle()

Return type

int

property partial_requests

The collected partial requests under the current request_id

Return type

List[Request]

property partial_messages

The collected partial messages under the current request_id

Return type

List[Message]