PubSubStreamingPullTask class¶
fastpubsub._internal.delivery.streaming_pull.PubSubStreamingPullTask
¶
A task that runs the handler for each message that the core receives.
The core gives the server twice the max_messages limit, because
the server stops the stream too early at the exact limit. The task
keeps the max_messages limit itself: it runs at most that many
handlers at the same time, and the other messages wait in a queue.
Initializes the PubSubStreamingPullTask.
| PARAMETER | DESCRIPTION |
|---|---|
subscriber
|
The subscriber to receive messages for.
TYPE:
|
Source code in fastpubsub/_internal/delivery/streaming_pull.py
start
async
¶
Starts the message stream.
Source code in fastpubsub/_internal/delivery/streaming_pull.py
task_ready
¶
Checks if the task is ready.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the message stream runs, False otherwise. |
task_alive
¶
Checks if the task is alive.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the message stream runs, False otherwise. |
shutdown
async
¶
Stops the stream and waits for the messages in progress.
| PARAMETER | DESCRIPTION |
|---|---|
timeout
|
The maximum time to wait, in seconds.
TYPE:
|