我需要在我的專案作業中使用持久函式。我們的開發堆疊是powershell,我必須從定時器觸發功能觸發協調器功能。對于觸發,我發現使用了 Start-NewOrchestration 命令 let 但我需要將輸入傳遞給它。我無法找到此命令的檔案。任何人都可以幫忙嗎?
uj5u.com熱心網友回復:
嘗試使用以下 PowerShell Cmdlet:
# Client Function - DurableFunctionsTimerTrigger/HttpStart
using namespace System.Net
param($Request, $TriggerMetadata)
$FunctionName = $Request.Params.FunctionName
$InstanceId = Start-NewOrchestration -FunctionName $FunctionName
Write-Host "Started orchestration with ID = '$InstanceId'"
$Response = New-OrchestrationCheckStatusResponse -Request $Request -InstanceId $InstanceId
Push-OutputBinding -Name Response -Value $Response
或者
$OrchestratorInput = @{
'TriggeringTime' = Set-Date '2021-01-01'
}
$InstanceId = Start-NewOrchestration -FunctionName $FunctionName -InputObject $OrchestratorInput
有關更多詳細資訊,請參閱Azure Durable Functions with PowerShell博客和GitHub 文章。
如何將 POST 引數傳遞給 Durable 函式,然后將此引數傳遞給定時器觸發函式
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/389928.html
標籤:天蓝色 电源外壳 天蓝色函数 azure-powershell 天蓝色耐用功能
