Fix examples to work as expected (#2305)

* Fix examples to work as expected

* Clean up examples

* Update worker test

* Merge in from main and cleanup example
This commit is contained in:
Adam Hopkins
2021-11-23 23:00:25 +02:00
committed by GitHub
parent 2c03eee329
commit 55c36e0240
24 changed files with 267 additions and 174 deletions

View File

@@ -21,7 +21,7 @@ def gunicorn_worker():
"gunicorn "
f"--bind 127.0.0.1:{PORT} "
"--worker-class sanic.worker.GunicornWorker "
"examples.simple_server:app"
"examples.hello_world:app"
)
worker = subprocess.Popen(shlex.split(command))
time.sleep(2)
@@ -35,7 +35,7 @@ def gunicorn_worker_with_access_logs():
"gunicorn "
f"--bind 127.0.0.1:{PORT + 1} "
"--worker-class sanic.worker.GunicornWorker "
"examples.simple_server:app"
"examples.hello_world:app"
)
worker = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE)
time.sleep(2)
@@ -50,7 +50,7 @@ def gunicorn_worker_with_env_var():
f"--bind 127.0.0.1:{PORT + 2} "
"--worker-class sanic.worker.GunicornWorker "
"--log-level info "
"examples.simple_server:app"
"examples.hello_world:app"
)
worker = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE)
time.sleep(2)