MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _set_entry_timeout

Method _set_entry_timeout

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

Source from the content-addressed store, hash-verified

2638 self._on_remove(entry._statement)
2639
2640 def _set_entry_timeout(self, entry):
2641 # Clear the existing timeout.
2642 self._clear_entry_callback(entry)
2643
2644 # Set the new timeout if it's not 0.
2645 if self._max_lifetime:
2646 entry._cleanup_cb = self._loop.call_later(
2647 self._max_lifetime, self._on_entry_expired, entry)
2648
2649 def _new_entry(self, query, statement):
2650 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