reach_commons 0.18.27__tar.gz → 0.18.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reach_commons-0.18.27 → reach_commons-0.18.28}/PKG-INFO +1 -1
- {reach_commons-0.18.27 → reach_commons-0.18.28}/pyproject.toml +1 -1
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/sqs.py +37 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/README.md +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/__init__.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/app_logging/__init__.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/app_logging/http_logger.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/app_logging/log_deprecated_endpoints.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/app_logging/logger.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/app_logging/logging_config.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/clients/__init__.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/clients/event_processor.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/clients/hubspot.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/clients/outscraper.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/clients/reach_data_bridge.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/clients/reach_ops_api.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/mongo/__init__.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/mongo/customer_persistence.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/mongo/customer_persistence_async.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/mongo/validation/__init__.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/__init__.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/commons.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/dynamo_db.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/exceptions.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/firehose.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/kms.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_aws/s3.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/reach_base_model.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/redis_manager.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/sms_smart_encoding.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/utils.py +0 -0
- {reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/validations.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# isort .; black .; poetry build; poetry publish
|
|
2
2
|
[tool.poetry]
|
|
3
3
|
name = "reach_commons"
|
|
4
|
-
version = "0.18.
|
|
4
|
+
version = "0.18.28"
|
|
5
5
|
description = "Reach Commons is a versatile utility library designed to streamline and enhance development workflows within the Reach ecosystem."
|
|
6
6
|
authors = ["Engineering <engineering@getreach.ai>"]
|
|
7
7
|
license = "MIT"
|
|
@@ -647,3 +647,40 @@ class POSApiPullerSQSNotifier(SQSClient):
|
|
|
647
647
|
message_attributes=message_attributes,
|
|
648
648
|
delay_seconds=delay_seconds,
|
|
649
649
|
)
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
class AnomalySQSNotifier(SQSClient):
|
|
653
|
+
"""
|
|
654
|
+
Notificador genérico para enviar eventos de anomalias via SQS
|
|
655
|
+
para outro serviço responsável por montar e enviar o e-mail.
|
|
656
|
+
"""
|
|
657
|
+
|
|
658
|
+
DEFAULT_REGION = "us-east-1"
|
|
659
|
+
DEFAULT_TOPIC = "reach-data-bridge-messages-queue"
|
|
660
|
+
|
|
661
|
+
def __init__(
|
|
662
|
+
self,
|
|
663
|
+
*,
|
|
664
|
+
topic_name: str = None,
|
|
665
|
+
service_name: str = None,
|
|
666
|
+
region_name: str = DEFAULT_REGION,
|
|
667
|
+
logger=None,
|
|
668
|
+
env: str = os.environ.get("ENV", "Staging"),
|
|
669
|
+
):
|
|
670
|
+
"""
|
|
671
|
+
Args:
|
|
672
|
+
topic_name: Nome base da fila (sem prefixo de env). Default: reach-data-bridge-messages-queue
|
|
673
|
+
service_name: Nome do serviço para uso no message_attribute. Default: nome da classe.
|
|
674
|
+
"""
|
|
675
|
+
if logger is None:
|
|
676
|
+
logger = get_reach_logger()
|
|
677
|
+
|
|
678
|
+
self.env = env
|
|
679
|
+
self.service_name = service_name or self.__class__.__name__
|
|
680
|
+
base_topic = topic_name or self.DEFAULT_TOPIC
|
|
681
|
+
|
|
682
|
+
super().__init__(
|
|
683
|
+
region_name=region_name,
|
|
684
|
+
logger=logger,
|
|
685
|
+
topic_name=f"{env}-{base_topic}",
|
|
686
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reach_commons-0.18.27 → reach_commons-0.18.28}/reach_commons/mongo/customer_persistence_async.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|