nebu 0.1.97__py3-none-any.whl → 0.1.99__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/decorate.py +8 -2
- {nebu-0.1.97.dist-info → nebu-0.1.99.dist-info}/METADATA +1 -1
- {nebu-0.1.97.dist-info → nebu-0.1.99.dist-info}/RECORD +6 -6
- {nebu-0.1.97.dist-info → nebu-0.1.99.dist-info}/WHEEL +0 -0
- {nebu-0.1.97.dist-info → nebu-0.1.99.dist-info}/licenses/LICENSE +0 -0
- {nebu-0.1.97.dist-info → nebu-0.1.99.dist-info}/top_level.txt +0 -0
nebu/processors/decorate.py
CHANGED
@@ -395,6 +395,7 @@ def processor(
|
|
395
395
|
config: Optional[GlobalConfig] = None,
|
396
396
|
hot_reload: bool = True,
|
397
397
|
debug: bool = False,
|
398
|
+
name: Optional[str] = None,
|
398
399
|
):
|
399
400
|
def decorator(
|
400
401
|
func: Callable[[Any], Any],
|
@@ -411,7 +412,8 @@ def processor(
|
|
411
412
|
f"Decorator Init: @processor decorating function '{func.__name__}'"
|
412
413
|
)
|
413
414
|
all_env = env or []
|
414
|
-
processor_name = func.__name__
|
415
|
+
processor_name = name or func.__name__
|
416
|
+
actual_function_name = func.__name__
|
415
417
|
all_volumes = volumes or [] # Initialize volumes list
|
416
418
|
|
417
419
|
# Use a local variable for config resolution
|
@@ -967,7 +969,7 @@ def processor(
|
|
967
969
|
logger.debug(f"Decorator: Falling back to func.__module__: {module_path}")
|
968
970
|
|
969
971
|
# Basic info needed by consumer to find and run the function
|
970
|
-
all_env.append(V1EnvVar(key="FUNCTION_NAME", value=
|
972
|
+
all_env.append(V1EnvVar(key="FUNCTION_NAME", value=actual_function_name))
|
971
973
|
if rel_func_path:
|
972
974
|
# For now, just pass the relative file path, consumer will handle conversion
|
973
975
|
all_env.append(
|
@@ -1053,6 +1055,10 @@ def processor(
|
|
1053
1055
|
all_env.append(V1EnvVar(key="NEBU_EXECUTION_MODE", value=execution_mode))
|
1054
1056
|
logger.debug(f"Decorator: Set NEBU_EXECUTION_MODE to: {execution_mode}")
|
1055
1057
|
|
1058
|
+
# Add processor_name as a separate environment variable if needed for logging/identification in consumer
|
1059
|
+
all_env.append(V1EnvVar(key="PROCESSOR_RESOURCE_NAME", value=processor_name))
|
1060
|
+
logger.debug(f"Decorator: Set PROCESSOR_RESOURCE_NAME to: {processor_name}")
|
1061
|
+
|
1056
1062
|
# Add Hot Reload Configuration
|
1057
1063
|
if not hot_reload:
|
1058
1064
|
all_env.append(V1EnvVar(key="NEBU_DISABLE_HOT_RELOAD", value="1"))
|
@@ -15,14 +15,14 @@ nebu/namespaces/models.py,sha256=EqUOpzhVBhvJw2P92ONDUbIgC31M9jMmcaG5vyOrsWg,497
|
|
15
15
|
nebu/namespaces/namespace.py,sha256=oeZyGqsIGIrppyjif1ZONsdTmqRgd9oSLFE1BChXTTE,5247
|
16
16
|
nebu/processors/consumer.py,sha256=j6iKF_wc8RUNKrFqjB5keUX-Gj9hGZUbmAjEyTm-Oj0,55367
|
17
17
|
nebu/processors/consumer_process_worker.py,sha256=h--eNFKaLbUayxn88mB8oGGdrU2liE1dnwm_TPlewX8,36960
|
18
|
-
nebu/processors/decorate.py,sha256=
|
18
|
+
nebu/processors/decorate.py,sha256=OgUVpYx0E3bcBocdPPuE1YLg-PAChWbODqUKDIm6jUY,55852
|
19
19
|
nebu/processors/default.py,sha256=cy4ETMdbdRGkrvbYec1o60h7mGDlGN5JsuUph0ENtDU,364
|
20
20
|
nebu/processors/models.py,sha256=g4B1t6Rgoy-NUEHBLeQc0EENzHXLDlWSio8Muv7cTDU,4093
|
21
21
|
nebu/processors/processor.py,sha256=xxduD632g_2lBhAF2tZ3g0aoZJFgbfNwrDgtOAio0Is,16677
|
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.99.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
25
|
+
nebu-0.1.99.dist-info/METADATA,sha256=UG1YcDv7m2VoOK4gQqtNOveUHIEijLwc323vSwePSNI,1797
|
26
|
+
nebu-0.1.99.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
27
|
+
nebu-0.1.99.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
|
28
|
+
nebu-0.1.99.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|