Update TGBeta.ps1

This commit is contained in:
2025-01-07 01:02:00 -05:00
parent 0703410261
commit 8a828a75e2

View File

@@ -1036,10 +1036,10 @@ try {
Write-LogHybrid -Message "Unknown task: $TaskName" -Level "Warning"
}
}
}
}
function Execute-PrioritizedTasks {
function Execute-PrioritizedTasks {
param (
[Parameter(Mandatory = $true)]
[array]$Tasks
@@ -1054,10 +1054,10 @@ function Execute-PrioritizedTasks {
}
Write-Output "All tasks completed."
}
}
# Route to handle incoming task execution request
if ($request.HttpMethod -eq "POST" -and $request.Url.AbsolutePath -eq "/executeTasks") {
# Route to handle incoming task execution request
if ($request.HttpMethod -eq "POST" -and $request.Url.AbsolutePath -eq "/executeTasks") {
try {
$body = Get-Content -Raw -Path $request.InputStream | ConvertFrom-Json
$Tasks = $body.tasks
@@ -1075,7 +1075,9 @@ if ($request.HttpMethod -eq "POST" -and $request.Url.AbsolutePath -eq "/executeT
$response.ContentLength64 = $buffer.Length
$response.OutputStream.Write($buffer, 0, $buffer.Length)
$response.OutputStream.Close()
}
}
# ----------------------------------------------------------------