-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add pgctl environ to log pipeline #180
base: master
Are you sure you want to change the base?
Add pgctl environ to log pipeline #180
Conversation
@@ -871,3 +872,42 @@ def it_runs_after_all_services_have_stopped(self): | |||
0, | |||
norm=norm.pgctl, | |||
) | |||
|
|||
|
|||
class DescribePGCTLEnvironment(object): |
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.
Nit: uppercasing pgctl feels a little odd.
@@ -176,19 +176,20 @@ def svstat_parse(svstat_string): | |||
return SvStat(state, pid, exitcode, seconds, process) | |||
|
|||
|
|||
def prepend_timestamps_to(logfile): | |||
def prepend_timestamps_to(logfile, env=None): |
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.
Why default env?
return timestamps.stdin | ||
|
||
|
||
def _pipeline(cmd, stdin, stdout): | ||
def _pipeline(cmd, stdin, stdout, env=None): |
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.
Default again?
) | ||
assert returncode == 0 | ||
assert stderr == '' | ||
for pid in stdout.split('\n'): |
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.
What happens if lsof returns nothing?
After talking to bukzor in person, we will put a hold on this PR. We are able to resolve our issue in another (& better) solution. We will come back to this in the future if needs arise. |
Add PGCTL_* environment variables to processes spun up by pgctl. This makes it easier for process management.