-
Notifications
You must be signed in to change notification settings - Fork 118
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
adding command_executor to support multiple commands from a single shell #167
Conversation
Note that I have removed the I'd be curious to know if @fnichol has any words of caution regarding this strategy. I have tested GC's on the CommandExecutor as it is here and have not had issues with it losing sessions. |
I just made a few additional changes here:
This ensures the executor is closed when done.
|
I think this is ready to review. @sneal let me know if you think there is more to change or if I'm off anywhere. |
@mwrock Awesome stuff here, I love seeing things getting pushed upstream for reusability. I'll take a good look later next week when I have my laptop. |
### Deprecated methods | ||
As of version 1.5.0 `WinRM::WinRMWebService` methods `cmd`, `run_cmd`, `powershell`, and `run_powershell_script` have been deprecated and will be removed from the next major version of the WinRM gem. | ||
|
||
Use the `run_cmd` and `run_powershell_script` of the `WinRM::CommandExecutor` class instead. The `CommandExecutor` allows multiple commands to be run from the same WinRM shell providing a significant performance improvement whwn issuing multiple calls. |
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.
whwn => when
00aca31
to
86ef08a
Compare
…ell with retry logic openning shell
rebase/squashed and removing 1.5 versioning artifacts. Will merge that in a separate PR |
adding command_executor to support multiple commands from a single shell
Deprecates
WinRM::WinRMWebService
methodscmd
,run_cmd
,powershell
, andrun_powershell_script
in favor of therun_cmd
andrun_powershell_script
methods of theWinRM::CommandExecutor
class. TheCommandExecutor
allows multiple commands to be run from the same WinRM shell providing a significant performance improvement whwn issuing multiple calls.This PR is a prerequisite for WinRb/winrm-fs#28 which depend on
CommandExecutor
, which is being added here since it provides value beyond just transferring files.