jina.peapods.runtimes.asyncio.base

class jina.peapods.runtimes.asyncio.base.AsyncZMQRuntime(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.

async async_cancel()[source]
async async_run_forever()[source]
class jina.peapods.runtimes.asyncio.base.AsyncNewLoopRuntime(args)[source]

Bases: jina.peapods.runtimes.asyncio.base.AsyncZMQRuntime, abc.ABC

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.

async async_setup()[source]