Grammalecte  Check-in [12e5ec42ba]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

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:12e5ec42bab9e3312fcb588e84fcd4193ba7549377d1c68e53fdc7bedf94bec8
User & Date: olr 2019-08-14 09:51:35
Context
2019-08-14
10:19
[fr] ajustements check-in: 4d3729573f user: olr tags: fr, trunk
09:51
[server] init ProcessPoolExecutor for WSGI servers check-in: 12e5ec42ba user: olr tags: server, trunk
2019-08-12
15:01
[fr] faux positif check-in: fcff10f544 user: olr tags: fr, trunk
Changes

Changes to grammalecte-server.py.

316
317
318
319
320
321
322




323
324
325
326
327
328
329
...
345
346
347
348
349
350
351





    # 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()
................................................................................
            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)











>
>
>
>







 







>
>
>
>
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
...
349
350
351
352
353
354
355
356
357
358
359

    # 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()
................................................................................
            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()