tessl install tessl/pypi-gcloud@0.7.0Python client library for Google Cloud Platform services including Datastore, Storage, and Pub/Sub
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.19x
Baseline
Agent success rate without this tile
78%
A service that pulls and processes messages from a cloud messaging queue with configurable processing timeouts.
@generates
class MessageProcessor:
"""
Processes messages from a subscription with automatic deadline management.
"""
def __init__(self, subscription, processing_timeout=60):
"""
Initialize the processor.
Args:
subscription: The subscription object to pull messages from
processing_timeout: Maximum time in seconds to process a message before extending deadline
"""
pass
def process_messages(self, max_messages=5):
"""
Pull and process messages from the subscription.
Args:
max_messages: Maximum number of messages to pull (default: 5)
Returns:
A list of dictionaries with keys 'message_id', 'data', and 'status'
where status is either 'acknowledged' or 'extended'
"""
pass
def _handle_message(self, ack_id, message):
"""
Process a single message and manage its acknowledgment deadline.
Args:
ack_id: The acknowledgment ID for the message
message: The message object to process
Returns:
A dictionary with message details and processing status
"""
passProvides Cloud Pub/Sub functionality for message queue operations.
@satisfied-by