def __init__( self, data_dir, *, pg_superuser='******', port=edgedb_defines.EDGEDB_PORT, runstate_dir=None, env=None, testmode=False): self._pg_dsn = None self._data_dir = data_dir self._location = data_dir self._edgedb_cmd = [sys.executable, '-m', 'edb.server.main', '-D', self._data_dir] if devmode.is_in_dev_mode(): self._edgedb_cmd.append('--devmode') if testmode: self._edgedb_cmd.append('--testmode') if runstate_dir is None: runstate_dir = buildmeta.get_runstate_path(self._data_dir) self._runstate_dir = runstate_dir self._edgedb_cmd.extend(['--runstate-dir', runstate_dir]) self._pg_cluster = get_pg_cluster(self._data_dir) self._pg_superuser = pg_superuser self._daemon_process = None self._port = port self._effective_port = None self._env = env
def __init__(self, data_dir, *, pg_superuser='******', port=edgedb_defines.EDGEDB_PORT, runstate_dir=None, env=None, testmode=False, log_level=None): self._data_dir = data_dir if runstate_dir is None: runstate_dir = buildmeta.get_runstate_path(self._data_dir) super().__init__( runstate_dir, port=port, env=env, testmode=testmode, log_level=log_level, ) self._edgedb_cmd.extend(['-D', self._data_dir]) self._pg_connect_args['user'] = pg_superuser