Pode
Pode copied to clipboard
Why call Invoke-PodeTask so slowly ?
Question
A clear and concise description of your question.
Add-PodeTask -Name "Test" -ScriptBlock {
Write-Host "11111111111111"
Start-Sleep -Seconds 5
Write-Host "222222"
}
Add-PodeRoute -Method Get -Path '/test' -ScriptBlock {
try {
Write-Host "---------------------------"
for ($i = 0; $i -lt 30; $i++) {
Invoke-PodeTask -Name "Test"
}
}
catch {
Write-Host $_.Exception.Message
Write-Host $_.ScriptStackTrace
}
}
powershell itsself question ? https://github.com/PowerShell/PowerShell/issues/11826 ?
did you set Set-PodeTaskConcurrency?
Set-PodeTaskConcurrency 30 . Sorry, i am a newbies. Maybe casused by Search-Mailbox , I want to delete a batch of emails at exchagne online. i fetch all emails then put every email info into the pod-task to delete using Search-Mailbox.