Пример #1
0
 def __init__(
     self,
     handler: Handler,
     input_schema: marshmallow.Schema,
     from_subscription: str,
     output_schema: marshmallow.Schema,
     to_topic: str,
     project: str,
     from_topic: str = '',
 ):
     will_be_removed(
         'GoogleBaseReceiveAndReply',
         'ExecutorWithAck or GooglePubSubExecutorWithRequestId',
         '0.11.0',
     )
     subscriber = GooglePubSubSubscriber(
         project=project, subscription_name=from_subscription
     )
     deserializer = JSONDeserializerWithRequestIdRequired(schema=input_schema)
     serializer = BinaryJSONSerializerForSchema(schema=output_schema)
     publisher = GooglePubSubPublisher(project=project, to_topic=to_topic)
     super().__init__(
         handler=handler,
         deserializer=deserializer,
         subscriber=subscriber,
         serializer=serializer,
         publisher=publisher,
         from_topic=from_topic,
     )
Пример #2
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     will_be_removed(
         '_BaseGoogleListenerWithRequestIdLogger',
         'ExecutorWithAck or GooglePubSubExecutorWithRequestId',
         '0.11.0',
     )
Пример #3
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     will_be_removed(
         'GoogleEarlyAckReceiver',
         'ExecutorWithAck or GooglePubSubExecutorWithRequestId',
         '0.11.0',
     )
Пример #4
0
 def __init__(
     self,
     handler: Handler,
     input_schema: marshmallow.Schema,
     from_subscription: str,
     from_topic: str,
     output_schema: marshmallow.Schema,
     to_topic: str,
     project: str,
     cacher: Cacher,
 ):
     will_be_removed(
         'GoogleCachedReceiveAndReply',
         'ExecutorWithAck or GooglePubSubExecutorWithRequestId',
         '0.11.0',
     )
     GoogleEarlyAckReceiveAndReply.__init__(
         self,
         handler=handler,
         input_schema=input_schema,
         from_subscription=from_subscription,
         output_schema=output_schema,
         to_topic=to_topic,
         project=project,
         from_topic=from_topic,
     )
     CacheByRequestIdMixin.__init__(self, cacher)
Пример #5
0
 def __init__(
     self,
     output_schema: marshmallow.Schema,
     to_topic: str,
     project: str,
     handler: Handler = DUMMY_HANDLER,
     input_schema: Optional[marshmallow.Schema] = None,
 ):
     will_be_removed(
         deprecated_name='GoogleSimpleSender',
         use_instead='ExecutorWithAck or GooglePubSubExecutorWithRequestId',
         removing_in_version='0.11.0',
     )
     if input_schema is None:
         deserializer = None
     else:
         deserializer = JSONDeserializerWithRequestIdRequired(
             schema=input_schema)
     publisher = GooglePubSubPublisher(project=project, to_topic=to_topic)
     serializer = BinaryJSONSerializerForSchema(schema=output_schema)
     super().__init__(
         publisher=publisher,
         handler=handler,
         deserializer=deserializer,
         serializer=serializer,
     )
Пример #6
0
 def __init__(
     self,
     input_schema: marshmallow.Schema,
     from_subscription: str,
     project: str,
     handler: Handler,
     from_topic: str = '',
 ):
     will_be_removed(
         'GoogleBaseReceiver',
         'ExecutorWithAck or GooglePubSubExecutorWithRequestId',
         '0.11.0',
     )
     subscriber = GooglePubSubSubscriber(
         project=project, subscription_name=from_subscription
     )
     deserializer = JSONDeserializerWithRequestIdRequired(schema=input_schema)
     super().__init__(
         subscriber=subscriber,
         handler=handler,
         deserializer=deserializer,
         from_topic=from_topic,
     )