MCPcopy
hub / github.com/benoitc/gunicorn / _start_request

Method _start_request

gunicorn/dirty/client.py:396–415  ·  view source on GitHub ↗

Send the initial request to the arbiter.

(self)

Source from the content-addressed store, hash-verified

394 return self._read_next_chunk()
395
396 def _start_request(self):
397 """Send the initial request to the arbiter."""
398 with self.client._lock:
399 if self.client._sock is None:
400 self.client.connect()
401
402 # Set deadline for entire stream
403 now = time.monotonic()
404 self._deadline = now + self.client.timeout
405 self._last_chunk_time = now
406
407 self._request_id = str(uuid.uuid4())
408 request = make_request(
409 self._request_id,
410 self.app_path,
411 self.action,
412 args=self.args,
413 kwargs=self.kwargs,
414 )
415 DirtyProtocol.write_message(self.client._sock, request)
416
417 def _read_next_chunk(self):
418 """Read the next message from the stream."""

Callers 1

__next__Method · 0.95

Calls 3

make_requestFunction · 0.70
connectMethod · 0.45
write_messageMethod · 0.45

Tested by

no test coverage detected