nebu 0.1.126__py3-none-any.whl → 0.1.128__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.
@@ -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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.126
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
@@ -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=k2i2CJxI1MHi0J0dLr1PU0DrlDYmi8HiKbrmXMn-3qc,35402
22
+ nebu/processors/processor.py,sha256=2KAWGki6hfAD9Mg-0phEt6N45lz-cQQp8XQzvD92tF4,36047
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.126.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
26
- nebu-0.1.126.dist-info/METADATA,sha256=Y-sZBw2xLDusfWLeNfk_0tq_17GWD6xe4VHo8hxDHOg,1798
27
- nebu-0.1.126.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- nebu-0.1.126.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
29
- nebu-0.1.126.dist-info/RECORD,,
25
+ nebu-0.1.128.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
26
+ nebu-0.1.128.dist-info/METADATA,sha256=iNDy7WL9XqkL00UFNTjheMFFigGJ9cloYvsxOqFGwmI,1798
27
+ nebu-0.1.128.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ nebu-0.1.128.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
29
+ nebu-0.1.128.dist-info/RECORD,,
File without changes