Skip to content

Commit 78ac5bd

Browse files
committed
Add use_logging arg to replicate function too
1 parent fefd448 commit 78ac5bd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎testgres/testgres.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -937,18 +937,20 @@ def backup(self, username=None, xlog_method=DEFAULT_XLOG_METHOD):
937937
username=username,
938938
xlog_method=xlog_method)
939939

940-
def replicate(self, name, username=None, xlog_method=DEFAULT_XLOG_METHOD):
940+
def replicate(self, name, username=None, xlog_method=DEFAULT_XLOG_METHOD,
941+
use_logging=False):
941942
"""
942943
Create a replica of this node.
943944
944945
Args:
945946
name: replica's name (str).
946947
username: database user name (str).
947948
xlog_method: a method for collecting the logs ('fetch' | 'stream').
949+
use_logging: enable python logging
948950
"""
949951

950-
return self.backup(username=username,
951-
xlog_method=xlog_method).spawn_replica(name)
952+
backup = self.backup(username=username, xlog_method=xlog_method)
953+
return backup.spawn_replica(name, use_logging=use_logging)
952954

953955
def catchup(self):
954956
"""

0 commit comments

Comments
 (0)