MCPcopy Create free account

hub / github.com/benoitc/gunicorn / functions

Functions5,599 in github.com/benoitc/gunicorn

↓ 17 callersMethodnow
return date in Apache Common Log Format
gunicorn/glogging.py:395
↓ 17 callersMethodstart
Start server in background thread with asyncio event loop.
gunicorn/ctl/server.py:107
↓ 16 callersMethod_close_transport
Close the transport safely. Calls write_eof() first if supported to signal end of writing, which helps ensure buffered data is flushe
gunicorn/asgi/protocol.py:2311
↓ 16 callersMethod_signal_handler
Handle signals by setting alive = False.
gunicorn/dirty/worker.py:195
↓ 16 callersFunctionbuild_uwsgi_packet
Build a uWSGI packet from a dictionary of variables. Args: vars_dict: Dictionary of uWSGI variables modifier1: uWSGI modifier1 (d
tests/test_asgi_uwsgi.py:51
↓ 16 callersMethodclear
Delete all entries.
gunicorn/dirty/stash.py:392
↓ 16 callersFunctionget_dirty_client_async
Get or create a context-local async client. This is the recommended way to get a client in async HTTP workers. Args: timeout: T
gunicorn/dirty/client.py:703
↓ 16 callersFunctionmake_response
Create a success response message. Args: request_id: Request identifier being responded to data: Response data Returns:
gunicorn/ctl/protocol.py:191
↓ 16 callersMethodread_message
Read one message from a socket. Args: sock: Socket to read from Returns: Decoded message dictionary
gunicorn/ctl/protocol.py:78
↓ 15 callersFunctionMockConfig
Real gunicorn configuration with the HTTP/2 defaults these tests want. HTTP2Request applies the same header policy as HTTP/1, which reads for
tests/test_http2_integration.py:38
↓ 15 callersMethod_register_worker_apps
Register which apps a worker has loaded. Updates both app_worker_map and worker_app_map to track the bidirectional relations
gunicorn/dirty/arbiter.py:200
↓ 15 callersMethodclose
(self)
gunicorn/sock.py:77
↓ 15 callersMethodclose
(self)
tests/test_dirty_worker.py:84
↓ 15 callersFunctioncreate_h2_client
Create an h2 client connection.
tests/test_http2_integration.py:76
↓ 15 callersMethodexecute
Execute an action on a dirty app. The action runs in a thread pool executor to avoid blocking the asyncio event loop. Execut
gunicorn/dirty/worker.py:450
↓ 15 callersMethodget_sent_data
(self)
tests/test_http2_integration.py:66
↓ 15 callersMethodhandle_request
(self, listener_name, req, sock, addr)
tests/test_http2_h2c.py:382
↓ 15 callersMethodreap_workers
\ Reap workers to avoid zombie processes
gunicorn/arbiter.py:624
↓ 15 callersMethodrequest
(self, stream_id, method="GET", path="/", end_stream=True, extra=())
tests/test_http2_live.py:115
↓ 15 callersMethodset_recv_data
(self, data)
tests/test_http2_integration.py:69
↓ 15 callersMethodshutdown
Initiate shutdown. Args: mode: "graceful" (SIGTERM) or "quick" (SIGINT) Returns: Dictionary with st
gunicorn/ctl/handlers.py:440
↓ 15 callersMethodvalues
Iterate over values.
gunicorn/dirty/stash.py:401
↓ 15 callersFunctionws_client
WebSocket client factory for testing.
tests/docker/asgi_framework_compat/conftest.py:175
↓ 14 callersMethod_make_stream
Helper to create a stream with headers and body.
tests/test_http2_request.py:157
↓ 14 callersMethodclose
Close connection.
gunicorn/ctl/client.py:65
↓ 14 callersMethodinfo
(self, msg, *args, **kwargs)
gunicorn/glogging.py:288
↓ 14 callersMethodread_body_chunk
Read next body chunk asynchronously for streaming. Returns: bytes: Next chunk of body data, or None if body is complete.
gunicorn/http2/stream.py:369
↓ 14 callersMethodreadline
(self, size=None)
gunicorn/http/body.py:303
↓ 14 callersMethodsend_headers
Mark headers as sent. Args: headers: List of (name, value) tuples to send end_stream: True if this completes the resp
gunicorn/http2/stream.py:188
↓ 14 callersMethodstop
Stop server and cleanup socket.
gunicorn/ctl/server.py:120
↓ 13 callersMethod_open_post
(self)
tests/test_http2_connection.py:1304
↓ 13 callersFunctioncreate_worker
Create a test worker with mocked components.
tests/dirty/test_worker_streaming.py:61
↓ 13 callersMethodexecute_async
Execute an action on a dirty app (async/non-blocking). Args: app_path: Import path of the dirty app action:
gunicorn/dirty/client.py:223
↓ 13 callersMethodfeed_eof
Signal that the connection has been closed.
gunicorn/asgi/websocket.py:158
↓ 13 callersMethodfileno
(self)
gunicorn/workers/workertmp.py:49
↓ 13 callersFunctionload_dirty_app
Load a dirty app class from an import path. Args: import_path: String in format 'module.path:ClassName' Returns: An ins
gunicorn/dirty/app.py:215
↓ 13 callersFunctionmake_conn
Build a TConn around one end of a socketpair. Returns (conn, client_sock). Bytes in client_data are sent before TConn.init() runs, mimicking
tests/test_http2_h2c.py:52
↓ 13 callersMethodset_complete
Mark body as complete (called when message ends).
gunicorn/asgi/protocol.py:401
↓ 13 callersMethodstartup
Run lifespan startup and wait for completion. Raises: LifespanStartupFailed: If the app sent lifespan.startup.failed
gunicorn/asgi/lifespan.py:63
↓ 13 callersMethodstream_async
Stream results from a dirty app action (async). This method returns an async iterator that yields chunks from a streaming re
gunicorn/dirty/client.py:279
↓ 13 callersMethodtracebacks
(self)
tests/test_http2_live.py:92
↓ 13 callersMethodwrite_message
Write one message to a socket. Args: sock: Socket to write to data: Message dictionary to send
gunicorn/ctl/protocol.py:121
↓ 12 callersMethodclose
(self)
tests/dirty/test_client_streaming.py:51
↓ 12 callersMethoddebug
(self, msg, *args, **kwargs)
gunicorn/glogging.py:291
↓ 12 callersFunctiondrain_body
Drain the request body.
tests/docker/asgi_compliance/apps/http_app.py:578
↓ 12 callersMethodhandle
(self, listener, client, addr)
gunicorn/workers/sync.py:134
↓ 12 callersMethodhandle_exit
(self, sig, frame)
gunicorn/workers/base.py:187
↓ 12 callersFunctionmake_error_response
Create an error response message. Args: request_id: Request identifier being responded to error: Error message Returns:
gunicorn/ctl/protocol.py:209
↓ 12 callersFunctionparse_dirty_app_spec
Parse a dirty app specification. Supports two formats: - ``"module:Class"`` - standard format, all workers load the app - ``"module:
gunicorn/dirty/app.py:140
↓ 12 callersMethodread_message_async
Read one message from an async reader. Args: reader: asyncio StreamReader Returns: Decoded message
gunicorn/ctl/protocol.py:133
↓ 12 callersMethodreceive
ASGI receive callable - returns body chunks or disconnect.
gunicorn/asgi/protocol.py:421
↓ 12 callersMethodstart_response
(self, status, headers, exc_info=None)
gunicorn/http/wsgi.py:338
↓ 12 callersMethodupdate_priority
Update stream priority from PRIORITY frame. Args: weight: Priority weight (1-256), higher = more resources depends_on
gunicorn/http2/stream.py:288
↓ 11 callersMethod_build_http2_scope
Build ASGI HTTP scope from HTTP/2 request.
gunicorn/asgi/protocol.py:2765
↓ 11 callersFunction_get_client
Get or create a thread-local stash client.
gunicorn/dirty/stash.py:439
↓ 11 callersMethod_get_reason_phrase
Get HTTP reason phrase for status code.
gunicorn/asgi/protocol.py:2307
↓ 11 callersMethod_wait_for_flow_control_window
Wait for the stream's send window to become positive. Frames read while waiting are handled in order: a reset of this stream or a GOA
gunicorn/http2/connection.py:724
↓ 11 callersMethodconnect
Establish sync socket connection to arbiter. Raises: DirtyConnectionError: If connection fails
gunicorn/dirty/client.py:59
↓ 11 callersMethodfinish_body
Discard any unread body of the current message. Called before returning a keepalive connection to the poller so the socket does not a
gunicorn/http/parser.py:38
↓ 11 callersMethodfinish_request
Handle completion of a request (called via method_queue on main thread).
gunicorn/workers/gthread.py:474
↓ 11 callersFunctionframe_types
Frame type names in ``data``, parsed without an h2 state machine.
tests/test_http2_connection.py:1531
↓ 11 callersFunctionmake_stash_message
Build a stash operation message dict. Args: request_id: Unique request identifier (int or str) op: Stash operation code (STA
gunicorn/dirty/protocol.py:762
↓ 11 callersMethodread
Read data from the body. Args: size: Number of bytes to read, or None for all remaining Returns: bytes: The
gunicorn/http2/request.py:91
↓ 11 callersMethodreset
Reset this stream with RST_STREAM. Args: error_code: HTTP/2 error code (default: CANCEL)
gunicorn/http2/stream.py:249
↓ 11 callersMethodsend_command
Send command and wait for response. Args: command: Command string (e.g., "show workers") args: Optional addi
gunicorn/ctl/client.py:74
↓ 11 callersMethodset_recv_data
(self, data)
tests/test_http2_connection.py:72
↓ 11 callersMethodsettimeout
(self, timeout)
tests/dirty/test_client_streaming.py:48
↓ 11 callersMethodsettimeout
(self, timeout)
benchmarks/dirty_streaming.py:541
↓ 11 callersMethodstart
Start the dirty arbiter and workers.
benchmarks/dirty_benchmark.py:217
↓ 10 callersMethod_connect
(self, cfg, peername=TRUSTED_ADDR)
tests/test_http2_h2c.py:535
↓ 10 callersFunction_ended
(stream_id=1)
tests/test_http2_live.py:160
↓ 10 callersMethod_execute
Execute a stash operation. Args: op: Operation code (STASH_OP_*) table: Table name key: Optional
gunicorn/dirty/stash.py:137
↓ 10 callersMethod_handle_http_request
Handle a single HTTP request. Returns whether the connection may be kept alive. When ``complete`` is a future, it gets that answer as
gunicorn/asgi/protocol.py:1666
↓ 10 callersMethodaccess
Measure request duration request_time is a datetime.timedelta
gunicorn/instrument/statsd.py:99
↓ 10 callersMethodclear
(self)
tests/test_early_hints.py:96
↓ 10 callersMethodclear_sent
(self)
tests/test_http2_integration.py:72
↓ 10 callersMethodclose
Close the connection gracefully with GOAWAY. Args: error_code: HTTP/2 error code (default: NO_ERROR) last_stream_id:
gunicorn/http2/connection.py:961
↓ 10 callersFunctiondrain_task
Cancel a protocol task and let the loop deliver the cancellation. Closing the loop on a task suspended mid-await leaves the coroutine to be c
tests/test_http2_h2c.py:505
↓ 10 callersMethodencode_header
Encode the 16-byte message header. Args: msg_type: Message type (MSG_TYPE_REQUEST, etc.) request_id: Unique
gunicorn/dirty/protocol.py:115
↓ 10 callersMethodget_client
Create HTTP/2 client.
examples/http2_gevent/test_http2_gevent.py:59
↓ 10 callersMethodget_gunicorn_pids
Get PIDs of gunicorn processes. Uses ps output with proctitle if available, otherwise falls back to process tree analysis.
tests/docker/dirty_arbiter/test_parent_death.py:132
↓ 10 callersMethodget_header
Get a header value by name. Args: name: Header name (case-insensitive) Returns: str: Header value, or None i
gunicorn/http2/request.py:328
↓ 10 callersMethodget_sent_data
(self)
tests/test_early_hints.py:93
↓ 10 callersMethodhandle_request
Handle a single request message. Supports both regular (non-streaming) and streaming responses. For streaming, detects if th
gunicorn/dirty/worker.py:315
↓ 10 callersMethodinfo
(self, msg, *args)
examples/dirty_example/test_worker_integration.py:31
↓ 10 callersMethodlisten
()
tests/test_http2_h2c.py:1552
↓ 10 callersMethodroute_request
Route a request to an available dirty worker via queue. Each worker has a dedicated queue and consumer task. Requests are su
gunicorn/dirty/arbiter.py:448
↓ 10 callersMethodsend_error
Send an error response on a stream. Args: stream_id: The stream ID status_code: HTTP status code message:
gunicorn/http2/connection.py:912
↓ 10 callersMethodstop
\ Stop workers :attr graceful: boolean, If True (the default) workers will be killed gracefully (ie. trying to wait for the
gunicorn/arbiter.py:442
↓ 10 callersMethodwrite_message_async
Write a message to async stream. Accepts dict format for backwards compatibility. Args: writer: asyncio StreamW
gunicorn/dirty/protocol.py:468
↓ 9 callersMethod_body
A body whose connection hands over one frame per pump().
tests/test_http2_request.py:821
↓ 9 callersMethod_build_environ
Build minimal WSGI-like environ dict for access logging.
gunicorn/asgi/protocol.py:2039
↓ 9 callersFunction_cfg
(http_parser, **overrides)
tests/test_header_policy_parity.py:30
↓ 9 callersFunction_compose
(*args, env=None, **kw)
tests/docker/stress/conftest.py:85
↓ 9 callersFunction_connect
(app, http_parser, keepalive=2, grace=3)
tests/test_asgi_keepalive_background.py:93
↓ 9 callersFunction_get
(path, close=False)
tests/test_asgi_keepalive_background.py:135
↓ 9 callersMethod_is_websocket_upgrade
Check if request is a WebSocket upgrade. Per RFC 6455 Section 4.1, the opening handshake requires: - HTTP method MUST be GET
gunicorn/asgi/protocol.py:1604
↓ 9 callersFunction_parse
(raw, cfg, peer_addr)
tests/test_header_policy_parity.py:25
↓ 9 callersMethod_read_exact
Read exactly size bytes from the unreader.
gunicorn/uwsgi/message.py:117
↓ 9 callersFunction_run_ws
Accept, feed ``frames``, and collect what the app receives.
tests/test_asgi_websocket_enhanced.py:578
← previousnext →101–200 of 5,599, ranked by callers