Update TGBeta.ps1

This commit is contained in:
2025-01-07 00:53:52 -05:00
parent d2b45940c9
commit 0703410261

View File

@@ -1036,9 +1036,10 @@ try {
Write-LogHybrid -Message "Unknown task: $TaskName" -Level "Warning"
}
}
}
}
function Execute-PrioritizedTasks {
function Execute-PrioritizedTasks {
param (
[Parameter(Mandatory = $true)]
[array]$Tasks
@@ -1053,10 +1054,10 @@ try {
}
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
@@ -1074,7 +1075,7 @@ try {
$response.ContentLength64 = $buffer.Length
$response.OutputStream.Write($buffer, 0, $buffer.Length)
$response.OutputStream.Close()
}
}
# ----------------------------------------------------------------