Sanic Server WorkerManager refactor (#2499)
Co-authored-by: Néstor Pérez <25409753+prryplatypus@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
import os
|
||||
import socket
|
||||
|
||||
from sanic import Sanic, response
|
||||
|
||||
|
||||
@@ -13,13 +10,4 @@ async def test(request):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
server_address = "./uds_socket"
|
||||
# Make sure the socket does not already exist
|
||||
try:
|
||||
os.unlink(server_address)
|
||||
except OSError:
|
||||
if os.path.exists(server_address):
|
||||
raise
|
||||
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
sock.bind(server_address)
|
||||
app.run(sock=sock)
|
||||
app.run(unix="./uds_socket")
|
||||
|
||||
Reference in New Issue
Block a user