-
Notifications
You must be signed in to change notification settings - Fork 85
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 State does not reflect actual state of job #95
Comments
Thanks! |
I've solved this issue and just need to implement it within the module. https://learn-powershell.net/2016/12/04/tracking-the-state-of-powershell-runspaces-in-a-runspacepool/ |
@oldlost This should be fixed now, please test and let me know the results. |
@proxb I just grabbed the latest version today. When I call I'm going to do some digging tomorrow to see if I can provide more information, but I wanted to drop a note in case you have an ah-ha moment and already know what is happening. |
@platta Thanks for the heads up on this. I'm going to also take a look and see if I can duplicate the issue. Just out of curiosity, what version of PowerShell are you running? Did you download the module from the PowerShell gallery or from GitHub? |
i did a very simple demo to see what would happen and it appears to be working as expected on PowerShell V5 on Windows 10. PS C:\WINDOWS\system32> 1..10|ssj {start-sleep 10}
Id Name State HasMoreData HasErrors Command
-- ---- ----- ----------- --------- -------
1 Job1 Running False False start-sleep 10
2 Job2 Running False False start-sleep 10
3 Job3 Running False False start-sleep 10
4 Job4 Running False False start-sleep 10
5 Job5 Running False False start-sleep 10
6 Job6 NotStarted False False start-sleep 10
7 Job7 NotStarted False False start-sleep 10
8 Job8 NotStarted False False start-sleep 10
9 Job9 NotStarted False False start-sleep 10
10 Job10 NotStarted False False start-sleep 10 I'll try some other tests to see what happens. |
The first time it happened I was on 2008 R2 using V4. This morning I was able to reproduce it on Windows 10 using V5. Both those times I had downloaded the source through a browser from the GitHub page. Using Install-Module or the download link in the project's readme both gave me a working example. Here's the fun part - Git diff shows that all versions of the module are identical, so after all that testing I re-extracted the original zip that gave me "broken" behavior. Now it works. I can no longer reproduce the issue. I replaced the module with a copy downloaded using the link in the readme on the 2008 R2 machine and now that one works too. I give up! |
Weird! I'm glad that it is working now but odd that it happened all of a sudden without any real updates to the code or environment. Maybe we can just mark it as gremlins in the system? :) |
sometime ago I have such gremlin when I have two module versions: from gallery and manually installed from github into other catalog |
When creating RSJobs, all objects begin with State of Running even though the actual state should be NotStarted. Only when a job actually begins execution should its state be set to Running.
The other states appear to be correct.
The text was updated successfully, but these errors were encountered: