pynenc.broker.sqlite_broker¶
SQLite-based broker for cross-process testing.
This module provides a SQLite-based broker implementation that enables true cross-process coordination for testing process runners.
Module Contents¶
Classes¶
Table names for broker, scoped by app_id. |
|
A SQLite-based implementation of the broker for cross-process testing. |
API¶
- class pynenc.broker.sqlite_broker.Tables(app_id: str)[source]¶
Bases:
pynenc.util.sqlite_utils.TableNamesTable names for broker, scoped by app_id.
Initialization
- class pynenc.broker.sqlite_broker.SQLiteBroker(app: pynenc.app.Pynenc)[source]¶
Bases:
pynenc.broker.base_broker.BaseBrokerA SQLite-based implementation of the broker for cross-process testing.
Uses SQLite for cross-process message queue coordination and implements all required abstract methods from BaseBroker. It’s designed specifically for testing process runners.
Warning
The
SQLiteBrokerclass is designed for testing purposes only and should not be used in production systems. It uses temporary SQLite files for state.Initialization
- send_message(invocation_id: pynenc.identifiers.invocation_id.InvocationId) None[source]¶
Send a message (invocation ID) to the queue.
- route_invocation(invocation_id: pynenc.identifiers.invocation_id.InvocationId) None[source]¶
Route a single invocation ID by sending it to the message queue.
- route_invocations(invocation_ids: list[pynenc.identifiers.invocation_id.InvocationId]) None[source]¶
Route multiple invocation IDs by sending them to the message queue.