jina.peapods.runtimes.container

class jina.peapods.runtimes.container.ContainerRuntime(args)[source]

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

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.

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.