-
Notifications
You must be signed in to change notification settings - Fork 86
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
RSJob on PSv2 #136
Comments
hmm... Everything is much worse than I thought import-module poshrsjob
1..3|start-rsjob { start-sleep -sec 15; $_ } take 45 sec to exit to prompt sorry, have no time to check earlier versions today :( |
I really need to figure out and fix the issue with AppVeyor that broke my V2 tests. I think I saw a PR over at @RamblingCookieMonster Invoke-Parallel (RamblingCookieMonster/Invoke-Parallel#41) that I might steal from to get it working again. In the meantime, it looks like some background stuff that uses reflection for the Types may not be V2 compatible (https://github.com/proxb/PoshRSJob/blob/master/PoshRSJob/TypeData/PoshRSJob.Types.ps1xml). I'll have to test more in V2 and figure out the best way to handle that. I don't really want to lose this functionality due to V2 as it provides better state tracking of RSJobs. |
Just did another test v2 with $j = 1..3 | Start-RSJob { start-sleep -sec 15; $_ }
start-sleep -sec 14
$j delay while outputting jobs from |
I found the issue with the disappearing states which was due to one of the techniques that I use for reflection was missing some of the other parameters that exists in V3+. Luckily it was a simple fix by adding $Null as the second parameter and it supports V2+. Before After I couldn't reproduce the delay either after making that change so this may solve both items. I'll add this to the list of things when I upload the next version tonight or tomorrow. |
Another v2 error (I continue to report here)
debug show that scriptblock converted to |
start-sleep issue not fixed, but I fix all other in my fork latest commit |
About --- a/PoshRSJob/TypeData/PoshRSJob.Types.ps1xml
+++ b/PoshRSJob/TypeData/PoshRSJob.Types.ps1xml
@@ -83,7 +83,7 @@
$this.innerjob.HadErrors
}
Else {
- ($this.innerjob.Streams.Error -ne $null)
+ ($this.innerjob.Streams.Error.Count -ne 0)
}
</GetScriptBlock>
</ScriptProperty> let it be here until widely tested |
Jobs can't set it's state on powershell v2
What is the expected behavior?
actually Jobs a running but it's State not set, so Wait-RSJob does not exit
The text was updated successfully, but these errors were encountered: