ironmansoftware / universal-automation

Universal Automation is the PowerShell-first automation platform.
https://ironmansoftware.com/universal-automation/
MIT License
24 stars 4 forks source link

Wait-UAJob hangs indefinitely #116

Closed romphreak closed 4 years ago

romphreak commented 4 years ago

Describe the Issue

When using the Wait-UAJob cmdlet (either via pipeline or by itself), the powershell session hangs indefinitely and cannot be cancelled.

To Reproduce

Steps to reproduce the behavior: (Example)

  1. Add a script to UA
  2. Create job by invoking UA script
  3. Either pipe the invoke to Wait-UAJob, or call Wait-UAJob by itself

Expected behavior

The command to complete and the powershell session to be usable again.

Screenshots

image

image

Script Sample

$script = New-UAScript -Name FOO -ScriptBlock {Get-Process} Invoke-UAScript $script | Wait-UAJob

-or-

$script = New-UAScript -Name FOO -ScriptBlock {Get-Process} $job = Invoke-UAScript $script Wait-UAJob -JobId $job.Id

Version Information

adamdriscoll commented 4 years ago

Wait-UAJob was throwing an exception internally which was causing it to wait forever. This has been resolved.