nebu 0.1.128__tar.gz → 0.1.129__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.
Files changed (36) hide show
  1. {nebu-0.1.128/src/nebu.egg-info → nebu-0.1.129}/PKG-INFO +1 -1
  2. {nebu-0.1.128 → nebu-0.1.129}/pyproject.toml +1 -1
  3. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/processors/processor.py +19 -5
  4. {nebu-0.1.128 → nebu-0.1.129/src/nebu.egg-info}/PKG-INFO +1 -1
  5. {nebu-0.1.128 → nebu-0.1.129}/LICENSE +0 -0
  6. {nebu-0.1.128 → nebu-0.1.129}/README.md +0 -0
  7. {nebu-0.1.128 → nebu-0.1.129}/setup.cfg +0 -0
  8. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/__init__.py +0 -0
  9. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/auth.py +0 -0
  10. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/builders/builder.py +0 -0
  11. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/builders/models.py +0 -0
  12. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/cache.py +0 -0
  13. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/config.py +0 -0
  14. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/containers/container.py +0 -0
  15. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/containers/models.py +0 -0
  16. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/data.py +0 -0
  17. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/errors.py +0 -0
  18. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/logging.py +0 -0
  19. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/meta.py +0 -0
  20. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/namespaces/models.py +0 -0
  21. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/namespaces/namespace.py +0 -0
  22. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/orign.py +0 -0
  23. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/processors/consumer.py +0 -0
  24. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/processors/consumer_health_worker.py +0 -0
  25. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/processors/consumer_process_worker.py +0 -0
  26. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/processors/decorate.py +0 -0
  27. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/processors/default.py +0 -0
  28. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/processors/models.py +0 -0
  29. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/redis/models.py +0 -0
  30. {nebu-0.1.128 → nebu-0.1.129}/src/nebu/services/service.py +0 -0
  31. {nebu-0.1.128 → nebu-0.1.129}/src/nebu.egg-info/SOURCES.txt +0 -0
  32. {nebu-0.1.128 → nebu-0.1.129}/src/nebu.egg-info/dependency_links.txt +0 -0
  33. {nebu-0.1.128 → nebu-0.1.129}/src/nebu.egg-info/requires.txt +0 -0
  34. {nebu-0.1.128 → nebu-0.1.129}/src/nebu.egg-info/top_level.txt +0 -0
  35. {nebu-0.1.128 → nebu-0.1.129}/tests/test_bucket.py +0 -0
  36. {nebu-0.1.128 → nebu-0.1.129}/tests/test_containers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.128
3
+ Version: 0.1.129
4
4
  Summary: A globally distributed container runtime
5
5
  Requires-Python: >=3.10.14
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nebu"
3
- version = "0.1.128"
3
+ version = "0.1.129"
4
4
  description = "A globally distributed container runtime"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10.14"
@@ -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
- polled_data = poll_response.json()
425
- if isinstance(polled_data, (dict, list, str)):
426
- raw_content = polled_data
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(polled_data)}. Content: {polled_data}"
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]}..."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.128
3
+ Version: 0.1.129
4
4
  Summary: A globally distributed container runtime
5
5
  Requires-Python: >=3.10.14
6
6
  Description-Content-Type: text/markdown
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