Pistol machine gun and waitress

I am trying to understand the behavior of the Pyramid regarding configuration [main:server]and gun.

If I use pserve, it will use the configuration [main:server]for waitress and gunicorn. For instance:

# development.ini 
[server:main]
use = egg:waitress#main
listen = *:6543

So, now it $ pserve development.iniwill launch the project with the waitress, which is expected. But if I use a command $ gunicorn(with a gun or a waitress in an ini file), this will work too, which is not expected from me.

My questions:

  • Why does this configuration work if I run the command $ gunicorn --paste development.ini?

  • what happens under the hook? does the waitress work? (I would say this is not in accordance with the processes on my computer)

+4
source share
2 answers

WSGI .

1) WSGI .

2) WSGI .

- , . ini PasteDeploy . , gunicorn --paste foo.ini , gunicorn ( waitress), . Gunicorn , , . ... [server:main], gunicorn cli. pserve, , , , , .

+2

, , , :

  • [main:server]
  • gunicorn, [main:server]
  • gunicorn use, .
  • gunicorn ( ), , config.py

- , . .

0

Source: https://habr.com/ru/post/1686395/


All Articles