Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc6d9c54

Browse files
author
vshepard
committed
Add cleanup parameter - clean full dir
1 parenta61f794 commitc6d9c54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎testgres/node.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -912,13 +912,14 @@ def free_port(self):
912912
self._should_free_port=False
913913
release_port(self.port)
914914

915-
defcleanup(self,max_attempts=3):
915+
defcleanup(self,max_attempts=3,full=False):
916916
"""
917917
Stop node if needed and remove its data/logs directory.
918918
NOTE: take a look at TestgresConfig.node_cleanup_full.
919919
920920
Args:
921921
max_attempts: how many times should we try to stop()?
922+
full: clean full base dir
922923
923924
Returns:
924925
This instance of :class:`.PostgresNode`.
@@ -927,7 +928,7 @@ def cleanup(self, max_attempts=3):
927928
self._try_shutdown(max_attempts)
928929

929930
# choose directory to be removed
930-
iftestgres_config.node_cleanup_full:
931+
iftestgres_config.node_cleanup_fullorfull:
931932
rm_dir=self.base_dir# everything
932933
else:
933934
rm_dir=self.data_dir# just data, save logs
@@ -1655,8 +1656,7 @@ def upgrade_from(self, old_node, options=None, expect_error=False):
16551656
"--old-datadir",old_node.data_dir,
16561657
"--new-datadir",self.data_dir,
16571658
"--old-port",str(old_node.port),
1658-
"--new-port",str(self.port),
1659-
"--copy"
1659+
"--new-port",str(self.port)
16601660
]
16611661
upgrade_command+=options
16621662

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp