Skip to content

Commit

Permalink
improve timestamps in queue
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Jan 6, 2025
1 parent 2845668 commit 8c1593a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/CIPPCore/Public/CippQueue/Invoke-ListCippQueue.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Invoke-ListCippQueue {
$CippQueueData = Get-CIPPAzDataTableEntity @CippQueue -Filter "Timestamp ge datetime'$3HoursAgo'" | Sort-Object -Property Timestamp -Descending

$QueueData = foreach ($Queue in $CippQueueData) {
$Tasks = Get-CIPPAzDataTableEntity @CippQueueTasks -Filter "QueueId eq '$($Queue.RowKey)'" | Where-Object { $_.Name } | Select-Object Timestamp, Name, Status
$Tasks = Get-CIPPAzDataTableEntity @CippQueueTasks -Filter "QueueId eq '$($Queue.RowKey)'" | Where-Object { $_.Name } | Select-Object @{n = 'Timestamp'; exp = { $_.Timestamp.DateTime.ToUniversalTime() } }, Name, Status
$TaskStatus = @{}
$Tasks | Group-Object -Property Status | ForEach-Object {
$TaskStatus.$($_.Name) = $_.Count
Expand Down Expand Up @@ -59,7 +59,7 @@ function Invoke-ListCippQueue {
PercentRunning = [math]::Round((($TotalRunning / $Queue.TotalTasks) * 100), 1)
Tasks = @($Tasks)
Status = $Queue.Status
Timestamp = $Queue.Timestamp
Timestamp = $Queue.Timestamp.DateTime.ToUniversalTime()
}

}
Expand Down

0 comments on commit 8c1593a

Please sign in to comment.