MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / _init_env

Method _init_env

asyncpg/cluster.py:448–460  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

446 self.reload()
447
448 def _init_env(self):
449 if not self._pg_bin_dir:
450 pg_config = self._find_pg_config(self._pg_config_path)
451 pg_config_data = self._run_pg_config(pg_config)
452
453 self._pg_bin_dir = pg_config_data.get('bindir')
454 if not self._pg_bin_dir:
455 raise ClusterError(
456 'pg_config output did not provide the BINDIR value')
457
458 self._pg_ctl = self._find_pg_binary('pg_ctl')
459 self._postgres = self._find_pg_binary('postgres')
460 self._pg_version = self._get_pg_version()
461
462 def _connection_addr_from_pidfile(self):
463 pidfile = os.path.join(self._data_dir, 'postmaster.pid')

Callers 2

get_statusMethod · 0.95
_init_envMethod · 0.45

Calls 6

_find_pg_configMethod · 0.95
_run_pg_configMethod · 0.95
_find_pg_binaryMethod · 0.95
_get_pg_versionMethod · 0.95
ClusterErrorClass · 0.85
getMethod · 0.80

Tested by

no test coverage detected