reach_commons 0.18.29__tar.gz → 0.18.31__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.29 → reach_commons-0.18.31}/PKG-INFO +1 -1
- {reach_commons-0.18.29 → reach_commons-0.18.31}/pyproject.toml +1 -1
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/sqs.py +15 -18
- {reach_commons-0.18.29 → reach_commons-0.18.31}/README.md +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/__init__.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/app_logging/__init__.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/app_logging/http_logger.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/app_logging/log_deprecated_endpoints.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/app_logging/logger.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/app_logging/logging_config.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/clients/__init__.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/clients/event_processor.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/clients/hubspot.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/clients/outscraper.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/clients/reach_data_bridge.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/clients/reach_ops_api.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/mongo/__init__.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/mongo/customer_persistence.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/mongo/customer_persistence_async.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/mongo/validation/__init__.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/__init__.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/commons.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/dynamo_db.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/exceptions.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/firehose.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/kms.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_aws/s3.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/reach_base_model.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/redis_manager.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/sms_smart_encoding.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/reach_commons/utils.py +0 -0
- {reach_commons-0.18.29 → reach_commons-0.18.31}/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.31"
|
|
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"
|
|
@@ -164,7 +164,6 @@ class SQSClient(BaseSQSClient):
|
|
|
164
164
|
"ApproximateNumberOfMessages", # visible
|
|
165
165
|
"ApproximateNumberOfMessagesNotVisible", # in-flight
|
|
166
166
|
"ApproximateNumberOfMessagesDelayed", # delayed
|
|
167
|
-
"ApproximateAgeOfOldestMessage",
|
|
168
167
|
],
|
|
169
168
|
)
|
|
170
169
|
|
|
@@ -173,14 +172,8 @@ class SQSClient(BaseSQSClient):
|
|
|
173
172
|
visible = int(attrs.get("ApproximateNumberOfMessages", 0))
|
|
174
173
|
in_flight = int(attrs.get("ApproximateNumberOfMessagesNotVisible", 0))
|
|
175
174
|
delayed = int(attrs.get("ApproximateNumberOfMessagesDelayed", 0))
|
|
176
|
-
oldest_age_seconds = int(attrs.get("ApproximateAgeOfOldestMessage", 0))
|
|
177
175
|
|
|
178
|
-
return {
|
|
179
|
-
"visible": visible,
|
|
180
|
-
"in_flight": in_flight,
|
|
181
|
-
"delayed": delayed,
|
|
182
|
-
"oldest_age_seconds": oldest_age_seconds,
|
|
183
|
-
}
|
|
176
|
+
return {"visible": visible, "in_flight": in_flight, "delayed": delayed}
|
|
184
177
|
|
|
185
178
|
except ClientError as exc:
|
|
186
179
|
self.logger.error(
|
|
@@ -225,28 +218,30 @@ class SQSClient(BaseSQSClient):
|
|
|
225
218
|
visible = metrics["visible"]
|
|
226
219
|
in_flight = metrics["in_flight"]
|
|
227
220
|
delayed = metrics["delayed"]
|
|
228
|
-
oldest_age_seconds = metrics["oldest_age_seconds"]
|
|
229
221
|
|
|
230
|
-
|
|
222
|
+
logical_visible = visible + delayed
|
|
223
|
+
|
|
224
|
+
total_messages = visible + in_flight + delayed
|
|
231
225
|
|
|
232
|
-
over_visible =
|
|
226
|
+
over_visible = logical_visible >= max_visible_capacity
|
|
233
227
|
over_total = (
|
|
234
|
-
max_total_capacity is not None and
|
|
228
|
+
max_total_capacity is not None and total_messages >= max_total_capacity
|
|
235
229
|
)
|
|
236
230
|
|
|
237
231
|
if over_visible or over_total:
|
|
238
232
|
self.logger.warning(
|
|
239
233
|
(
|
|
240
234
|
"queue_over_capacity, topic_name=%s, "
|
|
241
|
-
"visible=%s, in_flight=%s, delayed=%s,
|
|
242
|
-
"
|
|
235
|
+
"visible=%s, in_flight=%s, delayed=%s, "
|
|
236
|
+
"logical_visible=%s, total_messages=%s, "
|
|
237
|
+
"max_visible_capacity=%s, max_total_capacity=%s"
|
|
243
238
|
),
|
|
244
239
|
self.topic_name,
|
|
245
240
|
visible,
|
|
246
241
|
in_flight,
|
|
247
242
|
delayed,
|
|
248
|
-
|
|
249
|
-
|
|
243
|
+
logical_visible,
|
|
244
|
+
total_messages,
|
|
250
245
|
max_visible_capacity,
|
|
251
246
|
max_total_capacity,
|
|
252
247
|
)
|
|
@@ -255,7 +250,8 @@ class SQSClient(BaseSQSClient):
|
|
|
255
250
|
"visible_count": visible,
|
|
256
251
|
"in_flight_count": in_flight,
|
|
257
252
|
"delayed_count": delayed,
|
|
258
|
-
"
|
|
253
|
+
"logical_visible": logical_visible,
|
|
254
|
+
"total_messages": total_messages,
|
|
259
255
|
"max_visible_capacity": max_visible_capacity,
|
|
260
256
|
"max_total_capacity": max_total_capacity,
|
|
261
257
|
}
|
|
@@ -271,7 +267,8 @@ class SQSClient(BaseSQSClient):
|
|
|
271
267
|
"visible_count": visible,
|
|
272
268
|
"in_flight_count": in_flight,
|
|
273
269
|
"delayed_count": delayed,
|
|
274
|
-
"
|
|
270
|
+
"logical_visible": logical_visible,
|
|
271
|
+
"total_messages": total_messages,
|
|
275
272
|
"max_visible_capacity": max_visible_capacity,
|
|
276
273
|
"max_total_capacity": max_total_capacity,
|
|
277
274
|
}
|
|
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.29 → reach_commons-0.18.31}/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
|