Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
Fixes proxb#87
  • Loading branch information
proxb committed Aug 30, 2016
1 parent f70a178 commit c21bd8f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions PoshRSJob/PoshRSJob.psd1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#
# PoshRSJob
# Version 1.7.2.2
# Version 1.7.2.3
#
# Boe Prox (c) 2014
# http://learn-powershell.net
Expand All @@ -14,7 +14,7 @@
ModuleToProcess = 'PoshRSJob.psm1'

# Version number of this module.
ModuleVersion = '1.7.2.2'
ModuleVersion = '1.7.2.3'

# ID used to uniquely identify this module
GUID = '9b17fb0f-e939-4a5c-b194-3f2247452972'
Expand Down
16 changes: 9 additions & 7 deletions PoshRSJob/Public/Stop-RSJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,16 @@ Function Stop-RSJob {
} Else {
$ToStop = $List
}
[System.Threading.Monitor]::Enter($PoshRS_jobs.syncroot)
$ToStop | ForEach {
Write-Verbose "Stopping $($_.InstanceId)"
if ($_.State -ne 'Completed') {
Write-Verbose "Killing job $($_.InstanceId)"
[void] $_.InnerJob.Stop()
If ($ToStop) {
[System.Threading.Monitor]::Enter($PoshRS_jobs.syncroot)
$ToStop | ForEach {
Write-Verbose "Stopping $($_.InstanceId)"
if ($_.State -ne 'Completed') {
Write-Verbose "Killing job $($_.InstanceId)"
[void] $_.InnerJob.Stop()
}
}
[System.Threading.Monitor]::Exit($PoshRS_jobs.syncroot)
}
[System.Threading.Monitor]::Exit($PoshRS_jobs.syncroot)
}
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PoshRSJob 1.7.2.2
PoshRSJob 1.7.2.3
===================

[![Build status](https://ci.appveyor.com/api/projects/status/svrd4ho4otugki24?svg=true)](https://ci.appveyor.com/project/proxb/poshrsjob) [![Join the chat at https://gitter.im/proxb/PoshRSJob](https://badges.gitter.im/proxb/PoshRSJob.svg)](https://gitter.im/proxb/PoshRSJob?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand All @@ -10,8 +10,8 @@ Provides an alternative to PSjobs with greater performance and less overhead to
Install-Module -Name PoshRSJob
```

####Download the latest release (1.7.2.0)
https://github.com/proxb/PoshRSJob/releases/download/1.7.2.0/PoshRSJob.zip
####Download the latest release (1.7.2.3)
https://github.com/proxb/PoshRSJob/releases/download/1.7.2.3/PoshRSJob.zip


More information and examples here: http://learn-powershell.net/2015/04/19/latest-updates-to-poshrsjob/
Expand Down
5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---------
|1.7.2.3|
---------
* Fixed Issue #87 (Stop-RSJob gives an error if it has no input)

---------
|1.7.2.2|
---------
Expand Down

0 comments on commit c21bd8f

Please sign in to comment.