or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/gcloud@0.7.x
tile.json

tessl/pypi-gcloud

tessl install tessl/pypi-gcloud@0.7.0

Python 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%

task.mdevals/scenario-10/

Message Processing Service

A service that pulls and processes messages from a cloud messaging queue with configurable processing timeouts.

Capabilities

Message retrieval and processing

  • When processing starts, it pulls up to 5 messages from the subscription @test
  • When a message is processed successfully within the deadline, it is acknowledged @test
  • When processing takes longer than expected but completes before extended deadline, the message is acknowledged @test
  • When processing time approaches the deadline, the deadline is extended by 30 seconds @test

Implementation

@generates

API

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
        """
        pass

Dependencies { .dependencies }

gcloud { .dependency }

Provides Cloud Pub/Sub functionality for message queue operations.

@satisfied-by