Skip to content

Commit c657ee0

Browse files
committed
Convert delaySeconds to delayMillisepconds
1 parent fa44aea commit c657ee0

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

source/DSCResources/DSC_xServiceResource/DSC_xServiceResource.psm1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ function Get-TargetResource
207207
208208
.PARAMETER FailureActionsCollection
209209
An array of hash tables representing the failure actions to take. Each hash table should have
210-
two keys: type and delaySeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
211-
The value for the delaySeconds key is an integer value of seconds to wait before applying the requested action.
210+
two keys: type and delayMilliSeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
211+
The value for the delayMilliSeconds key is an integer value of seconds to wait before applying the requested action.
212212
213213
.PARAMETER FailureActionsOnNonCrashFailures
214214
By default, failure actions are only queued if the service terminates without reporting
@@ -505,8 +505,8 @@ function Set-TargetResource
505505
506506
.PARAMETER FailureActionsCollection
507507
An array of hash tables representing the failure actions to take. Each hash table should have
508-
two keys: type and delaySeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
509-
The value for the delaySeconds key is an integer value of seconds to wait before applying the requested action.
508+
two keys: type and delayMilliSeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
509+
The value for the delayMilliSeconds key is an integer value of seconds to wait before applying the requested action.
510510
511511
.PARAMETER FailureActionsOnNonCrashFailures
512512
By default, failure actions are only queued if the service terminates without reporting
@@ -793,8 +793,8 @@ function Test-TargetResource
793793
$inSync = $false
794794
}
795795

796-
if($parameterAction.delaySeconds -ne $serviceResourceAction.delaySeconds) {
797-
Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f "FailureActionsCollection Action $actionIndex delaySeconds", $Name, $parameterAction.delaySeconds, $serviceResourceAction.delaySeconds)
796+
if($parameterAction.delayMilliSeconds -ne $serviceResourceAction.delayMilliSeconds) {
797+
Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f "FailureActionsCollection Action $actionIndex delayMilliSeconds", $Name, $parameterAction.delayMilliSeconds, $serviceResourceAction.delayMilliSeconds)
798798
$inSync = $false
799799
}
800800
}
@@ -1761,8 +1761,8 @@ function Set-ServiceStartupType
17611761
17621762
.PARAMETER FailureActionsCollection
17631763
An array of hash tables representing the failure actions to take. Each hash table should have
1764-
two keys: type and delaySeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
1765-
The value for the delaySeconds key is an integer value of seconds to wait before applying the requested action.
1764+
two keys: type and delayMilliSeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
1765+
The value for the delayMilliSeconds key is an integer value of seconds to wait before applying the requested action.
17661766
17671767
.PARAMETER FailureActionsOnNonCrashFailures
17681768
By default, failure actions are only queued if the service terminates without reporting
@@ -2286,7 +2286,7 @@ function Get-FailureActionCollection
22862286

22872287
$currentAction = [PSCustomObject]@{
22882288
type = [ACTION_TYPE]([System.BitConverter]::ToInt32($Bytes[$actionTypeByteRange],0))
2289-
delaySeconds = [System.BitConverter]::ToInt32($Bytes[$actionDelayByteRange],0)
2289+
delayMilliSeconds = [System.BitConverter]::ToInt32($Bytes[$actionDelayByteRange],0)
22902290
}
22912291

22922292
$actionsCollection.Add($currentAction) | Out-Null
@@ -2324,8 +2324,8 @@ function Get-FailureActionCollection
23242324
23252325
.PARAMETER FailureActionsCollection
23262326
An array of hash tables representing the failure actions to take. Each hash table should have
2327-
two keys: type and delaySeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
2328-
The value for the delaySeconds key is an integer value of seconds to wait before applying the requested action.
2327+
two keys: type and delayMilliSeconds. The value for the type key should be one of RESTART, RUN_COMMAND, REBOOT, or NONE.
2328+
The value for the delayMilliSeconds key is an integer value of seconds to wait before applying the requested action.
23292329
23302330
.PARAMETER FailureActionsOnNonCrashFailures
23312331
By default, failure actions are only queued if the service terminates without reporting
@@ -2439,7 +2439,7 @@ function Set-ServiceFailureActionProperty {
24392439
# Iterate over the actions and their properties to add the integers that they encode to the array.
24402440
foreach ($action in $failureActions.ActionsCollection) {
24412441
$integerData.add([ACTION_TYPE]$action.type) | Out-Null
2442-
$integerData.add($action.delaySeconds) | Out-Null
2442+
$integerData.add($action.delayMilliSeconds) | Out-Null
24432443
}
24442444

24452445
# Now that we finally have all of the data we need, we can convert it to a byte array.

source/DSCResources/DSC_xServiceResource/DSC_xServiceResource.schema.mof

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ class DSC_xServiceResource : OMI_BaseResource
2626
class DSC_xFailureAction
2727
{
2828
[Write, Description("The action to take on failure"), ValueMap{"NONE", "RESTART", "REBOOT", "RUN_COMMAND"}, Values{"NONE", "RESTART", "REBOOT", "RUN_COMMAND"}] String Type;
29-
[Write, Description("Delay in seconds to wait before taking the specified action")] UInt32 DelaySeconds;
29+
[Write, Description("Delay in seconds to wait before taking the specified action")] UInt32 DelayMilliSeconds;
3030
};

0 commit comments

Comments
 (0)