Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pbckp 137 vs move pg node #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PBCKP-577 flake8 fixes
  • Loading branch information
v.shepard committed Apr 28, 2023
commit a3beb766c63d0aacff35da115ae9477256d0335b
23 changes: 12 additions & 11 deletions testgres/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class ProcessProxy(object):
process: wrapped psutill.Process object
ptype: instance of ProcessType
"""

def __init__(self, process, ptype=None):
self.process = process
self.ptype = ptype or ProcessType.from_process(process)
Expand Down Expand Up @@ -697,12 +698,12 @@ def start(self, params=[], wait=True):
return self

_params = [
get_bin_path("pg_ctl"),
"-D", self.data_dir,
"-l", self.pg_log_file,
"-w" if wait else '-W', # --wait or --no-wait
"start"
] + params # yapf: disable
get_bin_path("pg_ctl"),
"-D", self.data_dir,
"-l", self.pg_log_file,
"-w" if wait else '-W', # --wait or --no-wait
"start"
] + params # yapf: disable

try:
execute_utility(_params, self.utils_log_file)
Expand Down Expand Up @@ -752,7 +753,7 @@ def kill(self, someone=None):
"""
if self.is_started:
sig = signal.SIGKILL if os.name != 'nt' else signal.SIGBREAK
if someone == None:
if someone is None:
os.kill(self.pid, sig)
else:
os.kill(self.auxiliary_pids[someone][0], sig)
Expand Down Expand Up @@ -1496,10 +1497,10 @@ def querier():
return sum

def pgbench_table_checksums(self, dbname="postgres",
pgbench_tables = ('pgbench_branches',
'pgbench_tellers',
'pgbench_accounts',
'pgbench_history')
pgbench_tables=('pgbench_branches',
'pgbench_tellers',
'pgbench_accounts',
'pgbench_history')
):
return {(table, self.table_checksum(table, dbname))
for table in pgbench_tables}
Expand Down