phanterpwa 13.18.0__py3-none-any.whl → 13.21.0__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.
- phanterpwa/__init__.py +1 -1
- phanterpwa/server.py +13 -5
- {phanterpwa-13.18.0.dist-info → phanterpwa-13.21.0.dist-info}/METADATA +1 -1
- {phanterpwa-13.18.0.dist-info → phanterpwa-13.21.0.dist-info}/RECORD +9 -9
- {phanterpwa-13.18.0.dist-info → phanterpwa-13.21.0.dist-info}/LICENSE +0 -0
- {phanterpwa-13.18.0.dist-info → phanterpwa-13.21.0.dist-info}/WHEEL +0 -0
- {phanterpwa-13.18.0.dist-info → phanterpwa-13.21.0.dist-info}/dependency_links.txt +0 -0
- {phanterpwa-13.18.0.dist-info → phanterpwa-13.21.0.dist-info}/entry_points.txt +0 -0
- {phanterpwa-13.18.0.dist-info → phanterpwa-13.21.0.dist-info}/top_level.txt +0 -0
phanterpwa/__init__.py
CHANGED
phanterpwa/server.py
CHANGED
|
@@ -74,6 +74,9 @@ class PhanterPWATornado(object):
|
|
|
74
74
|
print(self.projectPath)
|
|
75
75
|
|
|
76
76
|
if self.apps_ports:
|
|
77
|
+
self.cpu_number = self.projectConfig["PROJECT"].get('cpu_number', os.cpu_count())
|
|
78
|
+
if os.name == "nt":
|
|
79
|
+
self.cpu_number = 1
|
|
77
80
|
for x in self.projectConfig['BACKEND']:
|
|
78
81
|
current_port = self.projectConfig['BACKEND'][x]['port']
|
|
79
82
|
handlers_app = importlib.import_module("backapps.{0}.handlers".format(x))
|
|
@@ -82,12 +85,14 @@ class PhanterPWATornado(object):
|
|
|
82
85
|
handlers_app.HANDLER,
|
|
83
86
|
**handlers_app.SETTINGS
|
|
84
87
|
)
|
|
85
|
-
app_http_server = httpserver.HTTPServer(app)
|
|
86
|
-
app_http_server.listen(int(current_port))
|
|
87
88
|
else:
|
|
88
89
|
app = handlers_app.HANDLER
|
|
89
|
-
|
|
90
|
+
app_http_server = httpserver.HTTPServer(app)
|
|
91
|
+
if self.cpu_number == 1:
|
|
90
92
|
app_http_server.listen(int(current_port))
|
|
93
|
+
else:
|
|
94
|
+
app_http_server.bind(int(current_port), reuse_port=True)
|
|
95
|
+
app_http_server.start(self.cpu_number)
|
|
91
96
|
|
|
92
97
|
for x in self.projectConfig['FRONTEND']:
|
|
93
98
|
current_port = self.projectConfig['FRONTEND'][x]['port']
|
|
@@ -100,11 +105,11 @@ class PhanterPWATornado(object):
|
|
|
100
105
|
else:
|
|
101
106
|
app = handlers_app.HANDLER
|
|
102
107
|
app_http_server = httpserver.HTTPServer(app)
|
|
103
|
-
if
|
|
108
|
+
if self.cpu_number == 1:
|
|
104
109
|
app_http_server.listen(int(current_port))
|
|
105
110
|
else:
|
|
106
111
|
app_http_server.bind(int(current_port), reuse_port=True)
|
|
107
|
-
|
|
112
|
+
app_http_server.start(self.cpu_number)
|
|
108
113
|
autoreload.watch(os.path.join(self.projectPath, "config.json"))
|
|
109
114
|
ioloop.IOLoop.current().start()
|
|
110
115
|
print("start stopped")
|
|
@@ -202,6 +207,9 @@ class ProjectRunner():
|
|
|
202
207
|
print()
|
|
203
208
|
print("=" * 79)
|
|
204
209
|
print("Starting server..........")
|
|
210
|
+
print("CPUs:", cfg["PROJECT"].get('cpu_number') or os.cpu_count())
|
|
211
|
+
if os.name == "nt":
|
|
212
|
+
print("CPUs:", 1)
|
|
205
213
|
if cfg['BACKEND']:
|
|
206
214
|
print('BACKEND')
|
|
207
215
|
for a in cfg['BACKEND']:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
phanterpwa/__init__.py,sha256=
|
|
1
|
+
phanterpwa/__init__.py,sha256=JSVtgtskWXL6FWDG4Q4sCChUa4UztFZ6YFwpAeNEC1I,397
|
|
2
2
|
phanterpwa/__main__.py,sha256=1vSHtv6-sgAgpZiklf9bwarXX1b-fmKx1rjwJw4h78o,4017
|
|
3
3
|
phanterpwa/compiler.py,sha256=Je3qtVO_cZ69_PPWcXKyBgnRfQ-Ev-zkZ3UTN-ddOTQ,47478
|
|
4
4
|
phanterpwa/configer.py,sha256=O0IO5rf-hwFNdBjcz94OF-fqXKTWbqPElTsfS5V2beY,26327
|
|
5
5
|
phanterpwa/helpers.py,sha256=gUoSd6OeMtA08jwFMrOCsuou58nwech-aGdiPSCX9GI,12138
|
|
6
6
|
phanterpwa/mail.py,sha256=YrsiIQY_SpqySIc7mi6MfyY881DIsoYAJ5dPAz8vorE,5741
|
|
7
7
|
phanterpwa/reversexml.py,sha256=YJeI8VuzEPw0D2z0Cz-HLt2n27WyJawZh6HRNZX5Ujg,10764
|
|
8
|
-
phanterpwa/server.py,sha256=
|
|
8
|
+
phanterpwa/server.py,sha256=3OEtkkeLgSwE6vskojEmpAdptOEEQQCOPy2aA2GLGCM,12692
|
|
9
9
|
phanterpwa/sms.py,sha256=XUULyDSk5gPjBqupchIcaGv-C6kX66XxrXpmzfnSp_A,1313
|
|
10
10
|
phanterpwa/tools.py,sha256=SKwqx_suix-b1DP72a7z98jlnSWDmtGNWgCQq_ogB1I,46173
|
|
11
11
|
phanterpwa/xmlconstructor.py,sha256=DMtc9BXI2NMGGmLszZXh2A63Iv0D1qgoWtn0aKyrmoo,162695
|
|
@@ -435,10 +435,10 @@ phanterpwa/usual_sass/preloaders/indefined_text.sass,sha256=z4JuUtBrzoqH3HuNFXvN
|
|
|
435
435
|
phanterpwa/usual_sass/preloaders/run_points.sass,sha256=EYl93ljfgAc-ZLJ0VScrCoIlHP7Nr6NLdxj1zk2wm_E,3367
|
|
436
436
|
phanterpwa/usual_sass/preloaders/square.sass,sha256=TOsh9muP4zkYLUJcw4i1LeRs60NrtgRWBk_1oMt2_58,1348
|
|
437
437
|
phanterpwa/usual_sass/preloaders/squares.sass,sha256=kH1I89qEfmbvYxCtKFVNcxP5bWIjnqbheXVnyGF0VNo,3862
|
|
438
|
-
phanterpwa-13.
|
|
439
|
-
phanterpwa-13.
|
|
440
|
-
phanterpwa-13.
|
|
441
|
-
phanterpwa-13.
|
|
442
|
-
phanterpwa-13.
|
|
443
|
-
phanterpwa-13.
|
|
444
|
-
phanterpwa-13.
|
|
438
|
+
phanterpwa-13.21.0.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
|
|
439
|
+
phanterpwa-13.21.0.dist-info/METADATA,sha256=3uf2iQKzsX0aD-iKsnXgqtnR_6KTt7IA2C3jHJ1Dy3Q,1939
|
|
440
|
+
phanterpwa-13.21.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
441
|
+
phanterpwa-13.21.0.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
|
|
442
|
+
phanterpwa-13.21.0.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
|
|
443
|
+
phanterpwa-13.21.0.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
|
|
444
|
+
phanterpwa-13.21.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|