nebu 0.1.111__py3-none-any.whl → 0.1.112__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 +9 -0
- {nebu-0.1.111.dist-info → nebu-0.1.112.dist-info}/METADATA +1 -1
- {nebu-0.1.111.dist-info → nebu-0.1.112.dist-info}/RECORD +6 -6
- {nebu-0.1.111.dist-info → nebu-0.1.112.dist-info}/WHEEL +0 -0
- {nebu-0.1.111.dist-info → nebu-0.1.112.dist-info}/licenses/LICENSE +0 -0
- {nebu-0.1.111.dist-info → nebu-0.1.112.dist-info}/top_level.txt +0 -0
nebu/processors/processor.py
CHANGED
@@ -330,6 +330,11 @@ class Processor(Generic[InputType, OutputType]):
|
|
330
330
|
logger.info(f"Log fetching is already running for {processor_name}.")
|
331
331
|
|
332
332
|
# Attempt to parse into OutputType if conditions are met
|
333
|
+
print(f">>> wait: {wait}")
|
334
|
+
print(f">>> self.schema_: {self.schema_}")
|
335
|
+
print(">>> type(self.schema_): ", type(self.schema_))
|
336
|
+
print(f">>> isinstance(self.schema_, type): {isinstance(self.schema_, type)}")
|
337
|
+
print(f">>> isinstance(raw_content, dict): {isinstance(raw_content, dict)}")
|
333
338
|
if (
|
334
339
|
wait
|
335
340
|
and self.schema_
|
@@ -337,16 +342,20 @@ class Processor(Generic[InputType, OutputType]):
|
|
337
342
|
and issubclass(self.schema_, BaseModel) # type: ignore
|
338
343
|
and isinstance(raw_content, dict)
|
339
344
|
): # Check if raw_content is a dict
|
345
|
+
print(f">>> raw_content: {raw_content}")
|
340
346
|
try:
|
341
347
|
# self.schema_ is assumed to be the Pydantic model class for OutputType
|
342
348
|
# Parse raw_content instead of the full response
|
343
349
|
parsed_model = self.schema_.model_validate(raw_content)
|
350
|
+
print(f">>> parsed_model: {parsed_model}")
|
344
351
|
# Cast to OutputType to satisfy the linter with generics
|
345
352
|
parsed_output: OutputType = cast(OutputType, parsed_model)
|
353
|
+
print(f">>> parsed_output: {parsed_output}")
|
346
354
|
return parsed_output
|
347
355
|
except (
|
348
356
|
Exception
|
349
357
|
) as e: # Consider pydantic.ValidationError for more specific handling
|
358
|
+
print(f">>> error: {e}")
|
350
359
|
schema_name = getattr(self.schema_, "__name__", str(self.schema_))
|
351
360
|
logger.error(
|
352
361
|
f"Processor {processor_name}: Failed to parse 'content' field into output type {schema_name}. "
|
@@ -18,11 +18,11 @@ nebu/processors/consumer_process_worker.py,sha256=h--eNFKaLbUayxn88mB8oGGdrU2liE
|
|
18
18
|
nebu/processors/decorate.py,sha256=aT6TT8QOOpl8HKo8kYdwmX6785_l9kSfoyUSPp4tkuY,58726
|
19
19
|
nebu/processors/default.py,sha256=cy4ETMdbdRGkrvbYec1o60h7mGDlGN5JsuUph0ENtDU,364
|
20
20
|
nebu/processors/models.py,sha256=g4B1t6Rgoy-NUEHBLeQc0EENzHXLDlWSio8Muv7cTDU,4093
|
21
|
-
nebu/processors/processor.py,sha256=
|
21
|
+
nebu/processors/processor.py,sha256=xJJBgCOf1sgwZdIGflHX-MgGLbXfx4sbewprGTKNtTk,22490
|
22
22
|
nebu/redis/models.py,sha256=coPovAcVXnOU1Xh_fpJL4PO3QctgK9nBe5QYoqEcnxg,1230
|
23
23
|
nebu/services/service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
-
nebu-0.1.
|
25
|
-
nebu-0.1.
|
26
|
-
nebu-0.1.
|
27
|
-
nebu-0.1.
|
28
|
-
nebu-0.1.
|
24
|
+
nebu-0.1.112.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
25
|
+
nebu-0.1.112.dist-info/METADATA,sha256=SBW9hp88_1oF-YjCIMnQPDhdu7YW-jckq4SKREA_DTg,1798
|
26
|
+
nebu-0.1.112.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
27
|
+
nebu-0.1.112.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
|
28
|
+
nebu-0.1.112.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|