nebu 0.1.128__py3-none-any.whl → 0.1.129__py3-none-any.whl
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.
- nebu/processors/processor.py +19 -5
- {nebu-0.1.128.dist-info → nebu-0.1.129.dist-info}/METADATA +1 -1
- {nebu-0.1.128.dist-info → nebu-0.1.129.dist-info}/RECORD +6 -6
- {nebu-0.1.128.dist-info → nebu-0.1.129.dist-info}/WHEEL +0 -0
- {nebu-0.1.128.dist-info → nebu-0.1.129.dist-info}/licenses/LICENSE +0 -0
- {nebu-0.1.128.dist-info → nebu-0.1.129.dist-info}/top_level.txt +0 -0
nebu/processors/processor.py
CHANGED
@@ -421,14 +421,28 @@ class Processor(Generic[InputType, OutputType]):
|
|
421
421
|
f"Processor {processor_name}: Successfully retrieved message {message_id} via polling. Status: 200."
|
422
422
|
)
|
423
423
|
try:
|
424
|
-
|
425
|
-
if
|
426
|
-
|
424
|
+
polled_data_full = poll_response.json()
|
425
|
+
if (
|
426
|
+
isinstance(polled_data_full, dict)
|
427
|
+
and "content" in polled_data_full
|
428
|
+
):
|
429
|
+
# Extract the nested content for Pydantic validation
|
430
|
+
raw_content = polled_data_full.get("content")
|
431
|
+
logger.debug(
|
432
|
+
f"Processor {processor_name}: Extracted nested 'content' from polled data for {message_id}. Nested content: {str(raw_content)[:200]}..."
|
433
|
+
)
|
434
|
+
elif isinstance(polled_data_full, (dict, list, str)):
|
435
|
+
# Fallback: use the full polled data if 'content' key is not present in a dict, or if it's not a dict itself.
|
436
|
+
raw_content = polled_data_full
|
437
|
+
logger.warning(
|
438
|
+
f"Processor {processor_name}: Polled data for {message_id} did not contain a 'content' key as expected, or was not a dict. Using full polled data. Type: {type(polled_data_full)}. Data: {str(polled_data_full)[:200]}..."
|
439
|
+
)
|
427
440
|
else:
|
441
|
+
# Unexpected type for polled_data_full
|
442
|
+
raw_content = polled_data_full
|
428
443
|
logger.warning(
|
429
|
-
f"Processor {processor_name}: Polled data for {message_id} is of unexpected type: {type(
|
444
|
+
f"Processor {processor_name}: Polled data for {message_id} is of an unexpected type: {type(polled_data_full)}. Content: {str(polled_data_full)[:200]}..."
|
430
445
|
)
|
431
|
-
raw_content = polled_data
|
432
446
|
except json.JSONDecodeError:
|
433
447
|
logger.error(
|
434
448
|
f"Processor {processor_name}: Failed to decode JSON from polling response for {message_id}. Response text: {poll_response.text[:200]}..."
|
@@ -19,11 +19,11 @@ nebu/processors/consumer_process_worker.py,sha256=h--eNFKaLbUayxn88mB8oGGdrU2liE
|
|
19
19
|
nebu/processors/decorate.py,sha256=5p9pQrk_H8-Fj0UjsgSVCYx7Jk7KFuhMZtNhkKvpmkQ,61306
|
20
20
|
nebu/processors/default.py,sha256=cy4ETMdbdRGkrvbYec1o60h7mGDlGN5JsuUph0ENtDU,364
|
21
21
|
nebu/processors/models.py,sha256=8-TmKha2_QAnPlXcZxYjrCSPDCX7FFcMDMcHK77jK0U,4223
|
22
|
-
nebu/processors/processor.py,sha256=
|
22
|
+
nebu/processors/processor.py,sha256=hHb5e2LfQhrLXIS-BJP183takGgEN6Z46VqzhepWM7U,37259
|
23
23
|
nebu/redis/models.py,sha256=coPovAcVXnOU1Xh_fpJL4PO3QctgK9nBe5QYoqEcnxg,1230
|
24
24
|
nebu/services/service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
|
-
nebu-0.1.
|
26
|
-
nebu-0.1.
|
27
|
-
nebu-0.1.
|
28
|
-
nebu-0.1.
|
29
|
-
nebu-0.1.
|
25
|
+
nebu-0.1.129.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
26
|
+
nebu-0.1.129.dist-info/METADATA,sha256=GOVWO0OfeW9hbJrKsA_zSXathJyI5lsYJw1vi3Ksf94,1798
|
27
|
+
nebu-0.1.129.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
28
|
+
nebu-0.1.129.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
|
29
|
+
nebu-0.1.129.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|