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

Method reload

asyncpg/cluster.py:262–280  ·  view source on GitHub ↗

Reload server configuration.

(self)

Source from the content-addressed store, hash-verified

260 self._test_connection(timeout=wait)
261
262 def reload(self):
263 """Reload server configuration."""
264 status = self.get_status()
265 if status != 'running':
266 raise ClusterError('cannot reload: cluster is not running')
267
268 process = subprocess.run(
269 [self._pg_ctl, 'reload', '-D', self._data_dir],
270 stdout=subprocess.PIPE,
271 stderr=subprocess.PIPE,
272 cwd=self._data_dir,
273 )
274
275 stderr = process.stderr
276
277 if process.returncode != 0:
278 raise ClusterError(
279 'pg_ctl stop exited with status {:d}: {}'.format(
280 process.returncode, stderr.decode()))
281
282 def stop(self, wait=60):
283 process = subprocess.run(

Callers 5

test_pool_authMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80

Calls 3

get_statusMethod · 0.95
ClusterErrorClass · 0.85
runMethod · 0.80

Tested by 3

test_pool_authMethod · 0.64
setUpMethod · 0.64
setUpMethod · 0.64