3.3. aiomisc_worker module

3.3.1. aiomisc_worker.forking module

aiomisc_worker.forking.at_exit() → None[source]
aiomisc_worker.forking.fork(worker_id: bytes, cookie: bytes, address: str | tuple[str, int]) → None[source]
aiomisc_worker.forking.handle_interrupt(*_: Any) → None[source]
aiomisc_worker.forking.main() → int[source]

3.3.2. aiomisc_worker.process module

class aiomisc_worker.process.Worker(log_level: str, log_format: str, address: str | tuple[str, int], cookie: bytes, worker_id: bytes, env: Mapping[str, str], initializer: Callable[[...], Any], initializer_args: Any, initializer_kwargs: Any)[source]

Bases: object

close() → None[source]
property is_running: bool
kill(sig: int = Signals.SIGINT) → None[source]
aiomisc_worker.process.at_exit() → None[source]
aiomisc_worker.process.main() → int[source]

3.3.3. aiomisc_worker.process_inner module

aiomisc_worker.process_inner.worker_inner() → None[source]

3.3.4. aiomisc_worker.protocol module

class aiomisc_worker.protocol.AsyncProtocol(reader: StreamReader, writer: StreamWriter)[source]

Bases: object

PACKET_HEADER = <_struct.Struct object>
close() → None[source]
async receive() → Any[source]
async send(payload: Any) → None[source]
class aiomisc_worker.protocol.FileIOProtocol(fd: BinaryIO | IO[bytes])[source]

Bases: Protocol

fd: BinaryIO | IO[bytes]
class aiomisc_worker.protocol.Protocol[source]

Bases: ABC

PACKET_HEADER = <_struct.Struct object>
receive() → Any[source]
send(payload: Any) → None[source]
class aiomisc_worker.protocol.SocketIOProtocol(sock: socket)[source]

Bases: Protocol

sock: socket

3.3.5. aiomisc_worker.worker module

aiomisc_worker.worker.bad_initializer(address: str | tuple[str, int], cookie: bytes, worker_id: bytes, exc: BaseException) → None[source]
aiomisc_worker.worker.execute(protocol: SocketIOProtocol) → None[source]
aiomisc_worker.worker.on_cancel_signal(*_: Any) → None[source]
aiomisc_worker.worker.on_exception(exc_type: type[BaseException] | None, exc_value: BaseException | None, exc_tb: TracebackType | None) → None[source]
aiomisc_worker.worker.worker(address: str | tuple[str, int], cookie: bytes, worker_id: bytes) → None[source]