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

HasMoreData is always False #200

Open
RichardBenfield opened this issue Jun 17, 2019 · 10 comments
Open

HasMoreData is always False #200

RichardBenfield opened this issue Jun 17, 2019 · 10 comments

Comments

@RichardBenfield
Copy link

Do you want to request a feature or report a bug?
bug

What is the current behavior?
All jobs always appear to have a 'HasMoredata' property of False. Even though receive data shows that each job does in fact have data.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Create any jobs with Start-RSJob that returns data, then use Get-RSJob and Receive-RSJob. The Get-RSJob will show that each job has a "HasMoreData" property of False. Receive-RSJob will show that each job actually does contain data.

What is the expected behavior?
HasMoreData should be True, when it has data. Ideally, when received, the data would be cleared from the job and the HasMoreData property would be set to False.

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
Name Value


PSVersion 5.1.17134.765
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.765
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

ModuleType Version Name ExportedCommands


Script 1.7.4.4 PoshRSJob {Get-RSJob, Receive-RSJob, Remove-RSJob, Start-RSJob...}

Please provide a code example showing the issue, if applicable:
Example from https://learn-powershell.net/2015/03/31/introducing-poshrsjob-as-an-alternative-to-powershell-jobs/

$Test = 42
1..5|Start-RSJob -Name {"TEST_$($_)"} -ScriptBlock {
    Param($Object)
    $DebugPreference = 'Continue'
    $PSBoundParameters.GetEnumerator() | ForEach {
        Write-Debug $_
    }
    Write-Verbose "Creating object" -Verbose
    New-Object PSObject -Property @{
        Object=$Object
        Test=$Using:Test
    }
}```
MVKozlov added a commit to MVKozlov/PoshRSJob that referenced this issue Jun 17, 2019
@MVKozlov
Copy link
Contributor

Don't know why @proxb use string test for output...
because my PRs wait for merging so much time already you can try my own fork

@kborowinski
Copy link
Contributor

@MVKozlov : Question, I am using your PerJobTimeout branch on daily basis. Do you plan to merge it with your master? I am asking because you have just merged probx#200 to master and it fixes important issue which is still not solved in PerJobTimeout branch.

@RichardBenfield
Copy link
Author

Thank You @MVKozlov. Your fork is working great!

@MVKozlov
Copy link
Contributor

@kborowinski It already merged.
May be I should remove it...

@kborowinski
Copy link
Contributor

@MVKozlov: If PerJobTimeout branch is merged with master then I think that it would be good idea to remove it. The same with PreserveJobsOrder

@MVKozlov
Copy link
Contributor

I do not remove PreserveJobsOrder until now because I create PR from it. But may be this is a time...

@kborowinski
Copy link
Contributor

@MVKozlov: I have just tried to import latest version of PoshRSJob (1.7.5.1) from your repository and it gives small warning:

> Import-Module PoshRSJob -Verbose
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.5.1\PoshRSJob.psd1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.5.1\Scripts\TabExpansion.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.5.1\Scripts\TabExpansion.ps1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.5.1\PoshRSJob.psm1'.
WARNING: Start-RSJob.ps1: At C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.5.1\Public\Start-RSJob.ps1:576 char:21
+                     [void]$RunspacePool.ThreadOptions = $ThreadOption ...
+                     ~~~~~~
[void] cannot be used as a parameter type, or on the left side of an assignment.

@MVKozlov
Copy link
Contributor

ok, it not my commit, I fix it a bit later. and, please open issue in my repo because it not applicable here

@kborowinski
Copy link
Contributor

@MVKozlov: I can't open issue in your repo, there is no Issue tab

@MVKozlov
Copy link
Contributor

sorry, forget to enable it :)

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

No branches or pull requests

3 participants