MCPcopy
hub / github.com/psycopg/psycopg / fail

Method fail

psycopg_pool/psycopg_pool/pool.py:907–919  ·  view source on GitHub ↗

Signal the client that, alas, they won't have a connection today. Return True if the client has "accepted" the error, False otherwise (typically because wait() has timed out).

(self, error: Exception)

Source from the content-addressed store, hash-verified

905 return True
906
907 def fail(self, error: Exception) -> bool:
908 """Signal the client that, alas, they won't have a connection today.
909
910 Return True if the client has "accepted" the error, False otherwise
911 (typically because wait() has timed out).
912 """
913 with self._cond:
914 if self.conn or self.error:
915 return False
916
917 self.error = error
918 self._cond.notify_all()
919 return True
920
921
922class MaintenanceTask(ABC):

Callers 15

closeMethod · 0.45
pgconnFunction · 0.45
check_connection_versionFunction · 0.45
_connectMethod · 0.45
test_apilevelMethod · 0.45
test_threadsafetyMethod · 0.45
test_paramstyleMethod · 0.45
_paraminsertMethod · 0.45
test_executemanyMethod · 0.45
test_xidMethod · 0.45
test_tpc_beginMethod · 0.45
parseMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_apilevelMethod · 0.36
test_threadsafetyMethod · 0.36
test_paramstyleMethod · 0.36
test_executemanyMethod · 0.36
test_xidMethod · 0.36
test_tpc_beginMethod · 0.36
writerFunction · 0.36
test_fetch_typeFunction · 0.36
writerFunction · 0.36
waitFunction · 0.36
roleFunction · 0.36
test_changefeedFunction · 0.36