私は耐久性のある機能(オーケストレーション機能)に慣れていて、Microsoftのドキュメントに従ってサンプルアプリケーションを見ました。私は疑いがほとんどありません。タイマートリガーで耐久機能を呼び出す方法は?
例:要求が正常に処理されますが、私は、HTTPなどのさまざまな動詞を設定したとき、それがNOTFOUND」コンソールでのエラーと同様に行われた要求に応えたGETよう
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, methods: "post",
Route = "orchestrators/{functionName}")] HttpRequestMessage req,
[OrchestrationClient] DurableOrchestrationClient starter,
string functionName,
TraceWriter log)
{
// Function input comes from the request content.
dynamic eventData = await req.Content.ReadAsAsync<object>();
string instanceId = await starter.StartNewAsync(functionName, eventData);
log.Info($"Started orchestration with ID = '{instanceId}'.");
return starter.CreateCheckStatusResponse(req, instanceId);
}
それを呼び出すために、私は郵便配達を使用してHTTP POSTリクエストをしましたそれにブラウザからのHTTPリクエストに?
私はタイマ・トリガ・アズール機能にして任意のオーケストレーション機能を呼び出すことができますが起こったのか?
この.Whyコンソールで「NOTFOUND」エラーで応答していない場合は、なぜ?
UPDATE:質問
[FunctionName("TimerTrigger")]
public static async Task Run([TimerTrigger("0 */5 * * * *")]TimerInfo myTimer, TraceWriter log)
{//this runs for every 5minutes
using (HttpClient client = new HttpClient())
{
var content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("", "")
});
//making request to above function by http trigger
var result = await client.PostAsync("http://localhost:7071/orchestrators/E1_HelloSequence", content);
}
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
return;
}
について
いくつかの追加の詳細については、私は耐久性のある機能は、長い実行中のプロセスを持っているので、タイマーでオーケストレーション機能を呼び出すので、もしタイマーによってトリガーをでhttp要求がなぜtriggredすることができます私はなぜこのアプローチに従おうとしているのですか?そのような場合には、タイマーがタイムアウトする可能性があります。上記のコードで呼び出すことは可能ですか?
はあなたに感謝...私の問題は、上記のソリューションで解決 –