-
Notifications
You must be signed in to change notification settings - Fork 35
Couple of new methods and minor changes #19
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
небольшое ревью
@@ -361,6 +441,9 @@ def cleanup(self): | |||
pass | |||
|
|||
# remove data directory | |||
tblspace_list = os.listdir(os.path.join(self.data_dir, 'pg_tblspc')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Спорный функционал, я думаю, кто создал - тому и удалять, не нужно это автоматизировать.
@@ -252,6 +262,26 @@ def init_from_backup(self, root_node, backup_name, has_streaming=False, | |||
if has_streaming: | |||
self.enable_streaming(root_node) | |||
|
|||
def set_archiving_conf(self, archive_dir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это - неинвазивная конфигурация, ее должен задавать пользователь (а не фреймворк).
@@ -277,14 +307,15 @@ def append_conf(self, filename, string): | |||
|
|||
return self | |||
|
|||
def pg_ctl(self, command, params, command_options=[]): | |||
def pg_ctl(self, command, params={}, command_options=[]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это (pg_ctl) можно закомитить.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Здесь красивше использовать **kwargs и *args.
self.working = False | ||
return None | ||
|
||
def get_pid(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если не секрет, зачем это нужно, если есть status()
?
else: | ||
return None | ||
|
||
def get_control_data(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наверное, эта функция пригодится.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Так вроде она уже была. Хм...
No description provided.