MCPcopy
hub / github.com/psycopg/psycopg / _open

Method _open

psycopg_pool/psycopg_pool/pool.py:394–409  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

392 self.wait(timeout=timeout)
393
394 def _open(self) -> None:
395 if not self._closed:
396 return
397
398 self._check_open()
399
400 # Create these objects now to attach them to the right loop.
401 # See #219
402 self._tasks = Queue()
403 self._sched = Scheduler()
404
405 self._closed = False
406 self._opened = True
407
408 self._start_workers()
409 self._start_initial_tasks()
410
411 def _start_workers(self) -> None:
412 self._sched_runner = spawn(self._sched.run, name=f"{self.name}-scheduler")

Callers 2

__init__Method · 0.95
openMethod · 0.95

Calls 5

_start_workersMethod · 0.95
_start_initial_tasksMethod · 0.95
SchedulerClass · 0.85
_check_openMethod · 0.80
QueueClass · 0.70

Tested by

no test coverage detected