MCPcopy
hub / github.com/psycopg/psycopg / _try_cancel

Method _try_cancel

psycopg/psycopg/connection.py:338–342  ·  view source on GitHub ↗
(self, *, timeout: float = 5.0)

Source from the content-addressed store, hash-verified

336 self.cancel()
337
338 def _try_cancel(self, *, timeout: float = 5.0) -> None:
339 try:
340 self.cancel_safe(timeout=timeout)
341 except Exception as ex:
342 logger.warning("query cancellation failed: %s", ex)
343
344 @contextmanager
345 def transaction(

Callers 7

waitMethod · 0.95
test_cancel_safe_errorFunction · 0.45
test_cancel_safe_errorFunction · 0.45
finishMethod · 0.45
streamMethod · 0.45
finishMethod · 0.45
streamMethod · 0.45

Calls 1

cancel_safeMethod · 0.95

Tested by 2

test_cancel_safe_errorFunction · 0.36
test_cancel_safe_errorFunction · 0.36