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

Method stop

asyncpg/cluster.py:282–300  ·  view source on GitHub ↗
(self, wait=60)

Source from the content-addressed store, hash-verified

280 process.returncode, stderr.decode()))
281
282 def stop(self, wait=60):
283 process = subprocess.run(
284 [self._pg_ctl, 'stop', '-D', self._data_dir, '-t', str(wait),
285 '-m', 'fast'],
286 stdout=subprocess.PIPE,
287 stderr=subprocess.PIPE,
288 cwd=self._data_dir,
289 )
290
291 stderr = process.stderr
292
293 if process.returncode != 0:
294 raise ClusterError(
295 'pg_ctl stop exited with status {:d}: {}'.format(
296 process.returncode, stderr.decode()))
297
298 if (self._daemon_process is not None and
299 self._daemon_process.returncode is None):
300 self._daemon_process.kill()
301
302 def destroy(self):
303 status = self.get_status()

Callers 1

Calls 2

ClusterErrorClass · 0.85
runMethod · 0.80

Tested by 1