Skip to content

Commit ced9206

Browse files
authored
[Python] Bump Granian to 1.6 (#9253)
1 parent 91cefe6 commit ced9206

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
asyncpg==0.29.0
2-
granian>=1.5.1,<1.6.0
2+
granian>=1.6.0,<1.7.0
33
jinja2==3.1.4
44
orjson==3.10.2

frameworks/Python/granian/run.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
if __name__ == '__main__':
88
interface = sys.argv[1]
99
threading_mode = sys.argv[2]
10+
workers = multiprocessing.cpu_count()
1011

11-
#: split cores between the two loops
12-
workers = round(multiprocessing.cpu_count() / 2)
12+
if interface == "rsgi":
13+
#: split cores between the two loops
14+
workers = round(workers / 2)
1315

1416
blocking_threads = None
1517
if interface == "wsgi":

0 commit comments

Comments
 (0)