Update TGBeta.ps1
This commit is contained in:
13
TGBeta.ps1
13
TGBeta.ps1
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user