MCPcopy
hub / github.com/MagicStack/asyncpg / _set_entry_timeout

Method _set_entry_timeout

asyncpg/connection.py:2585–2592  ·  view source on GitHub ↗
(self, entry)

Source from the content-addressed store, hash-verified

2583 self._on_remove(entry._statement)
2584
2585 def _set_entry_timeout(self, entry):
2586 # Clear the existing timeout.
2587 self._clear_entry_callback(entry)
2588
2589 # Set the new timeout if it's not 0.
2590 if self._max_lifetime:
2591 entry._cleanup_cb = self._loop.call_later(
2592 self._max_lifetime, self._on_entry_expired, entry)
2593
2594 def _new_entry(self, query, statement):
2595 entry = _StatementCacheEntry(self, query, statement)

Callers 2

set_max_lifetimeMethod · 0.95
_new_entryMethod · 0.95

Calls 1

_clear_entry_callbackMethod · 0.95

Tested by

no test coverage detected