libentry 1.28.6__py3-none-any.whl → 1.29.1__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.
- libentry/mcp/service.py +18 -0
- {libentry-1.28.6.dist-info → libentry-1.29.1.dist-info}/METADATA +1 -1
- {libentry-1.28.6.dist-info → libentry-1.29.1.dist-info}/RECORD +8 -8
- {libentry-1.28.6.dist-info → libentry-1.29.1.dist-info}/LICENSE +0 -0
- {libentry-1.28.6.dist-info → libentry-1.29.1.dist-info}/WHEEL +0 -0
- {libentry-1.28.6.dist-info → libentry-1.29.1.dist-info}/entry_points.txt +0 -0
- {libentry-1.28.6.dist-info → libentry-1.29.1.dist-info}/top_level.txt +0 -0
- {libentry-1.28.6.dist-info → libentry-1.29.1.dist-info}/zip-safe +0 -0
libentry/mcp/service.py
CHANGED
@@ -1037,6 +1037,11 @@ class RunServiceConfig(BaseModel):
|
|
1037
1037
|
description="Access control allow methods.",
|
1038
1038
|
default="GET, POST"
|
1039
1039
|
)
|
1040
|
+
name: Optional[str] = Field(
|
1041
|
+
title="服务实例名称",
|
1042
|
+
description="服务实例名称,会在进程命令行中显示。",
|
1043
|
+
default=None
|
1044
|
+
)
|
1040
1045
|
|
1041
1046
|
|
1042
1047
|
def run_service(
|
@@ -1086,6 +1091,18 @@ def run_service(
|
|
1086
1091
|
for name, value in kwargs.items():
|
1087
1092
|
setattr(run_config, name, value)
|
1088
1093
|
|
1094
|
+
if run_config.name is None:
|
1095
|
+
if hasattr(service_type, "__name__"):
|
1096
|
+
name = service_type.__name__
|
1097
|
+
if hasattr(service_type, "__module__"):
|
1098
|
+
module = service_type.__module__
|
1099
|
+
if module != "builtins":
|
1100
|
+
name = f"{module}.{name}"
|
1101
|
+
run_config.name = name
|
1102
|
+
else:
|
1103
|
+
run_config.name = ""
|
1104
|
+
run_config.name = f"{run_config.name}({run_config.host}:{run_config.port})"
|
1105
|
+
|
1089
1106
|
logger.info("Starting gunicorn server.")
|
1090
1107
|
|
1091
1108
|
def ssl_context(config, _default_ssl_context_factory):
|
@@ -1112,6 +1129,7 @@ def run_service(
|
|
1112
1129
|
"ssl_context": ssl_context,
|
1113
1130
|
"access_control_allow_origin": run_config.access_control_allow_origin,
|
1114
1131
|
"access_control_allow_methods": run_config.access_control_allow_methods,
|
1132
|
+
"proc_name": run_config.name,
|
1115
1133
|
}
|
1116
1134
|
for name, value in options.items():
|
1117
1135
|
logger.info(f"Option {name}: {value}")
|
@@ -13,7 +13,7 @@ libentry/utils.py,sha256=vCm6UyAlibnPOlPJHZO57u3TXhw5PZmGM5_vBAPUnB4,1981
|
|
13
13
|
libentry/mcp/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
|
14
14
|
libentry/mcp/api.py,sha256=hhveOjDYhWiEEq3C7wSAOdpbPn9JP1T1CW3QYWrLHa4,3679
|
15
15
|
libentry/mcp/client.py,sha256=_O-O6OETwHidhiFmg7P01NIrVhHgEetwFeFfJNqRt6M,24899
|
16
|
-
libentry/mcp/service.py,sha256=
|
16
|
+
libentry/mcp/service.py,sha256=DTNNnpkt91_RWloQa3Tn-EC21NlrqsRI0MpkPzs0naM,42258
|
17
17
|
libentry/mcp/types.py,sha256=aAoVO4jjqEvDzNneuZapmRYonLLnGsbcLoypVyRNNYg,12389
|
18
18
|
libentry/service/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
|
19
19
|
libentry/service/common.py,sha256=OVaW2afgKA6YqstJmtnprBCqQEUZEWotZ6tHavmJJeU,42
|
@@ -22,10 +22,10 @@ libentry/service/list.py,sha256=ElHWhTgShGOhaxMUEwVbMXos0NQKjHsODboiQ-3AMwE,1397
|
|
22
22
|
libentry/service/running.py,sha256=FrPJoJX6wYxcHIysoatAxhW3LajCCm0Gx6l7__6sULQ,5105
|
23
23
|
libentry/service/start.py,sha256=mZT7b9rVULvzy9GTZwxWnciCHgv9dbGN2JbxM60OMn4,1270
|
24
24
|
libentry/service/stop.py,sha256=wOpwZgrEJ7QirntfvibGq-XsTC6b3ELhzRW2zezh-0s,1187
|
25
|
-
libentry-1.
|
26
|
-
libentry-1.
|
27
|
-
libentry-1.
|
28
|
-
libentry-1.
|
29
|
-
libentry-1.
|
30
|
-
libentry-1.
|
31
|
-
libentry-1.
|
25
|
+
libentry-1.29.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
26
|
+
libentry-1.29.1.dist-info/METADATA,sha256=ZtsgWLuz0EkgSZ35HWtPX5ocy7Lvuhzjo6QaOOOE5Qo,1135
|
27
|
+
libentry-1.29.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
28
|
+
libentry-1.29.1.dist-info/entry_points.txt,sha256=1v_nLVDsjvVJp9SWhl4ef2zZrsLTBtFWgrYFgqvQBgc,61
|
29
|
+
libentry-1.29.1.dist-info/top_level.txt,sha256=u2uF6-X5fn2Erf9PYXOg_6tntPqTpyT-yzUZrltEd6I,9
|
30
|
+
libentry-1.29.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
31
|
+
libentry-1.29.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|