nebu 0.1.125__py3-none-any.whl → 0.1.127__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 +6 -2
- {nebu-0.1.125.dist-info → nebu-0.1.127.dist-info}/METADATA +1 -1
- {nebu-0.1.125.dist-info → nebu-0.1.127.dist-info}/RECORD +6 -6
- {nebu-0.1.125.dist-info → nebu-0.1.127.dist-info}/WHEEL +0 -0
- {nebu-0.1.125.dist-info → nebu-0.1.127.dist-info}/licenses/LICENSE +0 -0
- {nebu-0.1.125.dist-info → nebu-0.1.127.dist-info}/top_level.txt +0 -0
nebu/processors/processor.py
CHANGED
@@ -259,6 +259,8 @@ class Processor(Generic[InputType, OutputType]):
|
|
259
259
|
api_key: Optional[str] = None,
|
260
260
|
user_key: Optional[str] = None,
|
261
261
|
timeout: Optional[float] = 3600,
|
262
|
+
poll: bool = False,
|
263
|
+
poll_interval_seconds: float = 2.0,
|
262
264
|
) -> OutputType | Dict[str, Any] | None:
|
263
265
|
"""
|
264
266
|
Allows the Processor instance to be called like a function, sending data.
|
@@ -270,6 +272,8 @@ class Processor(Generic[InputType, OutputType]):
|
|
270
272
|
api_key=api_key,
|
271
273
|
user_key=user_key,
|
272
274
|
timeout=timeout,
|
275
|
+
poll=poll,
|
276
|
+
poll_interval_seconds=poll_interval_seconds,
|
273
277
|
)
|
274
278
|
|
275
279
|
def send(
|
@@ -423,11 +427,11 @@ class Processor(Generic[InputType, OutputType]):
|
|
423
427
|
break # Exit polling loop
|
424
428
|
|
425
429
|
elif poll_response.status_code == 404:
|
426
|
-
|
430
|
+
print(
|
427
431
|
f"Processor {processor_name}: Message {message_id} not yet ready (404). Retrying in {poll_interval_seconds}s..."
|
428
432
|
)
|
429
433
|
elif poll_response.status_code == 202:
|
430
|
-
|
434
|
+
print(
|
431
435
|
f"Processor {processor_name}: Message {message_id} processing (202). Retrying in {poll_interval_seconds}s..."
|
432
436
|
)
|
433
437
|
else:
|
@@ -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=_JZIc5BXAfCTqsoqAJp_6_tD2D_WBlE4QeJIKMZjoc8,35388
|
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.127.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
26
|
+
nebu-0.1.127.dist-info/METADATA,sha256=Cvad84eLNPdvWcqP-H25DgDjS7PZNcaz8QxK6Qjt1z0,1798
|
27
|
+
nebu-0.1.127.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
28
|
+
nebu-0.1.127.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
|
29
|
+
nebu-0.1.127.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|