Overview
| Comment: | [server] init ProcessPoolExecutor for WSGI servers |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | server |
| Files: | files | file ages | folders |
| SHA3-256: |
12e5ec42bab9e3312fcb588e84fcd419 |
| User & Date: | olr on 2019-08-14 09:51:35 |
| Other Links: | manifest | tags |
Context
|
2019-08-14
| ||
| 10:19 | [fr] ajustements check-in: 4d3729573f user: olr tags: trunk, fr | |
| 09:51 | [server] init ProcessPoolExecutor for WSGI servers check-in: 12e5ec42ba user: olr tags: trunk, server | |
|
2019-08-12
| ||
| 15:01 | [fr] faux positif check-in: fcff10f544 user: olr tags: trunk, fr | |
Changes
Modified grammalecte-server.py from [729e0b7a88] to [c3315b73a8].
| ︙ | ︙ | |||
316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# Python version
print("Python: " + sys.version)
# Grammalecte
echo("Grammalecte v{}".format(oGCE.version))
oGCE.displayOptions()
# Process Pool Executor
initExecutor(nMultiCPU)
# Server (Bottle)
run(app, host=sHost, port=nPort)
if __name__ == '__main__':
xParser = argparse.ArgumentParser()
| > > > > | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# Python version
print("Python: " + sys.version)
# Grammalecte
echo("Grammalecte v{}".format(oGCE.version))
oGCE.displayOptions()
# Process Pool Executor
if xProcessPoolExecutor:
# If the module is imported and main() launched, we must shutdown the ProcessPoolExecutor
# which has been launched previously
xProcessPoolExecutor.shutdown(wait=False)
initExecutor(nMultiCPU)
# Server (Bottle)
run(app, host=sHost, port=nPort)
if __name__ == '__main__':
xParser = argparse.ArgumentParser()
|
| ︙ | ︙ | |||
345 346 347 348 349 350 351 |
dOpt.update({ opt:False for opt in xArgs.opt_off })
main(xArgs.host or "localhost", \
xArgs.port or 8080, \
dOpt,
xArgs.test_page,
xArgs.multiprocessor)
| > > > > | 349 350 351 352 353 354 355 356 357 358 359 |
dOpt.update({ opt:False for opt in xArgs.opt_off })
main(xArgs.host or "localhost", \
xArgs.port or 8080, \
dOpt,
xArgs.test_page,
xArgs.multiprocessor)
else:
# we do it for the server may be used with WSGI (which doesn’t call main())
# WSGI servers just import the given file as a module and use an object exported from it (<app> in this case) to run the server.
initExecutor()
|