libentry 1.12__py3-none-any.whl → 1.13__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/service/flask.py CHANGED
@@ -334,21 +334,25 @@ def run_service(
334
334
  port: int = 8888,
335
335
  num_workers: int = 1,
336
336
  num_threads: int = 20,
337
- num_connections: Optional[int] = 100,
338
- backlog: Optional[int] = 100,
337
+ num_connections: Optional[int] = 1000,
338
+ backlog: Optional[int] = 1000,
339
339
  worker_class: str = "gthread",
340
340
  timeout: int = 60,
341
341
  keyfile: Optional[str] = None,
342
342
  certfile: Optional[str] = None
343
343
  ):
344
344
  logger.info("Starting gunicorn server.")
345
+ if num_connections is None or num_connections < num_threads * 2:
346
+ num_connections = num_threads * 2
347
+ if backlog is None or backlog < num_threads * 2:
348
+ backlog = num_threads * 2
345
349
  options = {
346
350
  "bind": f"{host}:{port}",
347
351
  "workers": num_workers,
348
352
  "threads": num_threads,
349
353
  "timeout": timeout,
350
- "worker_connections": num_connections if num_connections else num_threads,
351
- "backlog": backlog if backlog else num_threads,
354
+ "worker_connections": num_connections,
355
+ "backlog": backlog,
352
356
  "keyfile": keyfile,
353
357
  "certfile": certfile,
354
358
  "worker_class": worker_class
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libentry
3
- Version: 1.12
3
+ Version: 1.13
4
4
  Summary: Entries for experimental utilities.
5
5
  Home-page: https://github.com/XoriieInpottn/libentry
6
6
  Author: xi
@@ -10,14 +10,14 @@ libentry/schema.py,sha256=ZlQnqUrL0YQ5koZnka7RNfOSzaH5llQ5XhQI6ig02xk,7629
10
10
  libentry/server.py,sha256=gYPoZXd0umlDYZf-6ZV0_vJadg3YQvnLDc6JFDJh9jc,1503
11
11
  libentry/service/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
12
12
  libentry/service/common.py,sha256=OVaW2afgKA6YqstJmtnprBCqQEUZEWotZ6tHavmJJeU,42
13
- libentry/service/flask.py,sha256=3fTkysQkCZ-flVH7FKWnOiMNmdkGb7kJGmmz1PZqkPE,11850
13
+ libentry/service/flask.py,sha256=_5bU9A44CmsRQFGMOuaUEZpJqVs08FAblVcCIphCQNY,11986
14
14
  libentry/service/list.py,sha256=ElHWhTgShGOhaxMUEwVbMXos0NQKjHsODboiQ-3AMwE,1397
15
15
  libentry/service/running.py,sha256=FrPJoJX6wYxcHIysoatAxhW3LajCCm0Gx6l7__6sULQ,5105
16
16
  libentry/service/start.py,sha256=mZT7b9rVULvzy9GTZwxWnciCHgv9dbGN2JbxM60OMn4,1270
17
17
  libentry/service/stop.py,sha256=wOpwZgrEJ7QirntfvibGq-XsTC6b3ELhzRW2zezh-0s,1187
18
- libentry-1.12.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
19
- libentry-1.12.dist-info/METADATA,sha256=42N3OAb8OEdO_DsYaIQgYzC9fvZGTsTzuqj7G-YY69k,791
20
- libentry-1.12.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
21
- libentry-1.12.dist-info/top_level.txt,sha256=u2uF6-X5fn2Erf9PYXOg_6tntPqTpyT-yzUZrltEd6I,9
22
- libentry-1.12.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
23
- libentry-1.12.dist-info/RECORD,,
18
+ libentry-1.13.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
19
+ libentry-1.13.dist-info/METADATA,sha256=5FKTWuTb2otAHMY4pZThJ21OlZyFv2kp402tUNolqyI,791
20
+ libentry-1.13.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
21
+ libentry-1.13.dist-info/top_level.txt,sha256=u2uF6-X5fn2Erf9PYXOg_6tntPqTpyT-yzUZrltEd6I,9
22
+ libentry-1.13.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
23
+ libentry-1.13.dist-info/RECORD,,