nebu 0.1.127__tar.gz → 0.1.128__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.127/src/nebu.egg-info → nebu-0.1.128}/PKG-INFO +1 -1
  2. {nebu-0.1.127 → nebu-0.1.128}/pyproject.toml +1 -1
  3. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/processors/processor.py +17 -5
  4. {nebu-0.1.127 → nebu-0.1.128/src/nebu.egg-info}/PKG-INFO +1 -1
  5. {nebu-0.1.127 → nebu-0.1.128}/LICENSE +0 -0
  6. {nebu-0.1.127 → nebu-0.1.128}/README.md +0 -0
  7. {nebu-0.1.127 → nebu-0.1.128}/setup.cfg +0 -0
  8. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/__init__.py +0 -0
  9. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/auth.py +0 -0
  10. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/builders/builder.py +0 -0
  11. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/builders/models.py +0 -0
  12. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/cache.py +0 -0
  13. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/config.py +0 -0
  14. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/containers/container.py +0 -0
  15. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/containers/models.py +0 -0
  16. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/data.py +0 -0
  17. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/errors.py +0 -0
  18. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/logging.py +0 -0
  19. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/meta.py +0 -0
  20. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/namespaces/models.py +0 -0
  21. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/namespaces/namespace.py +0 -0
  22. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/orign.py +0 -0
  23. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/processors/consumer.py +0 -0
  24. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/processors/consumer_health_worker.py +0 -0
  25. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/processors/consumer_process_worker.py +0 -0
  26. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/processors/decorate.py +0 -0
  27. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/processors/default.py +0 -0
  28. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/processors/models.py +0 -0
  29. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/redis/models.py +0 -0
  30. {nebu-0.1.127 → nebu-0.1.128}/src/nebu/services/service.py +0 -0
  31. {nebu-0.1.127 → nebu-0.1.128}/src/nebu.egg-info/SOURCES.txt +0 -0
  32. {nebu-0.1.127 → nebu-0.1.128}/src/nebu.egg-info/dependency_links.txt +0 -0
  33. {nebu-0.1.127 → nebu-0.1.128}/src/nebu.egg-info/requires.txt +0 -0
  34. {nebu-0.1.127 → nebu-0.1.128}/src/nebu.egg-info/top_level.txt +0 -0
  35. {nebu-0.1.127 → nebu-0.1.128}/tests/test_bucket.py +0 -0
  36. {nebu-0.1.127 → nebu-0.1.128}/tests/test_containers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.127
3
+ Version: 0.1.128
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.127"
3
+ version = "0.1.128"
4
4
  description = "A globally distributed container runtime"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10.14"
@@ -363,19 +363,31 @@ class Processor(Generic[InputType, OutputType]):
363
363
  # Poll only if poll=True AND the initial request was configured not to wait (wait=False).
364
364
  if poll and not stream_data_wait_param:
365
365
  message_id = raw_response_json.get("message_id")
366
+ return_stream = raw_response_json.get("return_stream")
367
+
366
368
  if not message_id or not isinstance(message_id, str):
367
369
  logger.error(
368
- f"Processor {processor_name}: Polling requested but 'message_id' (string) not found in initial response. Response: {raw_response_json}"
370
+ f"Processor {processor_name}: Polling requested but 'message_id' (string) not found or invalid in initial response. Response: {raw_response_json}"
369
371
  )
370
372
  raise ValueError(
371
373
  "Polling failed: 'message_id' (string) missing or invalid in initial server response."
372
374
  )
375
+ if not return_stream or not isinstance(return_stream, str):
376
+ logger.error(
377
+ f"Processor {processor_name}: Polling requested but 'return_stream' (string) not found or invalid in initial response. Response: {raw_response_json}"
378
+ )
379
+ raise ValueError(
380
+ "Polling failed: 'return_stream' (string) missing or invalid in initial server response for polling."
381
+ )
373
382
 
374
383
  # Polling URL using self.orign_host for consistency
375
384
  polling_url = f"{self.orign_host}/v1/processors/{processor_namespace}/{processor_name}/return/{message_id}"
376
385
 
386
+ # Prepare polling payload
387
+ poll_payload = {"consumer_group": return_stream}
388
+
377
389
  logger.info(
378
- f"Processor {processor_name}: Polling for message_id {message_id} at {polling_url}. Overall timeout: {timeout}s, Interval: {poll_interval_seconds}s."
390
+ f"Processor {processor_name}: Polling for message_id {message_id} at {polling_url} with payload {poll_payload}. Overall timeout: {timeout}s, Interval: {poll_interval_seconds}s."
379
391
  )
380
392
  polling_start_time = time.time()
381
393
 
@@ -401,7 +413,7 @@ class Processor(Generic[InputType, OutputType]):
401
413
  polling_url,
402
414
  headers={"Authorization": f"Bearer {current_op_api_key}"},
403
415
  timeout=individual_poll_timeout,
404
- json={}, # Send an empty JSON body for POST
416
+ json=poll_payload,
405
417
  )
406
418
 
407
419
  if poll_response.status_code == 200:
@@ -427,11 +439,11 @@ class Processor(Generic[InputType, OutputType]):
427
439
  break # Exit polling loop
428
440
 
429
441
  elif poll_response.status_code == 404:
430
- print(
442
+ logger.debug(
431
443
  f"Processor {processor_name}: Message {message_id} not yet ready (404). Retrying in {poll_interval_seconds}s..."
432
444
  )
433
445
  elif poll_response.status_code == 202:
434
- print(
446
+ logger.debug(
435
447
  f"Processor {processor_name}: Message {message_id} processing (202). Retrying in {poll_interval_seconds}s..."
436
448
  )
437
449
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.127
3
+ Version: 0.1.128
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