Skip to content
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

Name Powershell Script and Log Files Uniquely #6

Merged
merged 1 commit into from
Mar 30, 2016

Conversation

jerryk55
Copy link
Contributor

In order to allow winrm-elevated to run concurrently against the
same Windows server, name the powershell script uploaded to the server
using a randomly generated UUID.

In addition, the logfiles generated by the script will be named using the
pid of the script's running process.

We will clean up the logfiles when the script is finished. Since the same
script can be uploaded once and invoked multiple times it will be left intact.

The intent here is to deal with the issue described here: #5

@mwrock @sneal if you could review and possibly merge when possible that would be great.
Open for discussion of course. Thanks!

#
# @return [Hash] :stdout and :stderr
#
# @return [Hash] :stdout and :stderr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was an accident, which reminds I should probably enable RuboCop on this project and add an automated build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. Fixing.
@sneal - pushed with the fix.

@jerryk55 jerryk55 force-pushed the concurrent_file_naming branch from c1f1ada to 11220fa Compare March 30, 2016 13:32
In order to allow winrm-elevated to run concurrently against the
same Windows server, name the powershell script uploaded to the server
using a randomly generated UUID.

In addition, the logfiles generated by the script will be named using the
GetTempFileName to ensure uniqueness.

We will clean up the logfiles when the script is finished. Since the same
script can be uploaded once and invoked multiple times it will be left intact.
@jerryk55 jerryk55 force-pushed the concurrent_file_naming branch from 11220fa to fad4e00 Compare March 30, 2016 14:02
@sneal
Copy link
Member

sneal commented Mar 30, 2016

LGTM. I think we can cross the debugging bridge when we need. Perhaps we look for an environment variable, when set we skip the log deletion.

@mwrock
Copy link
Member

mwrock commented Mar 30, 2016

👍 yeaah I wouldn't worry about the debug scenario

@mwrock mwrock merged commit 98427da into WinRb:master Mar 30, 2016
@mwrock
Copy link
Member

mwrock commented Mar 30, 2016

tests work on my machine.

@jerryk55
Copy link
Contributor Author

Thanks guys. Will this be 0.3.0?

@mwrock
Copy link
Member

mwrock commented Mar 31, 2016

yup. released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants