azure-durable-functions

Durable Azure function binding types not registered when using dependency injection

孤街醉人 提交于 2020-04-11 05:46:41
问题 I created a standard durable function based from visual studio "Add new function" to project. This works fine out of the box. Then I followed the steps here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection to add dependency injection. Adding Microsoft.Extensions.http. This breaks the function and I get error: [03-Mar-20 14:58:18] The 'test' function is in error: The binding type(s) 'orchestrationTrigger' are not registered. Please ensure the type

Durable Azure function binding types not registered when using dependency injection

放肆的年华 提交于 2020-04-11 05:46:05
问题 I created a standard durable function based from visual studio "Add new function" to project. This works fine out of the box. Then I followed the steps here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection to add dependency injection. Adding Microsoft.Extensions.http. This breaks the function and I get error: [03-Mar-20 14:58:18] The 'test' function is in error: The binding type(s) 'orchestrationTrigger' are not registered. Please ensure the type

Can durable functions have multiple triggers?

走远了吗. 提交于 2020-02-24 17:00:07
问题 I have a durable function that is triggered once a day by a Timer Trigger: [FunctionName("MyDurableFunction")] public static async Task Run( [TimerTrigger("0 0 23 * * *", RunOnStartup = false)] TimerInfo myTimer, [OrchestrationClient] DurableOrchestrationClient starter, ILogger log) { await starter.StartNewAsync("OrchestrationFunction", null); } [FunctionName("OrchestrationFunction")] public static async Task OrchestrationFunction( [OrchestrationTrigger]DurableOrchestrationContext context,

Is durable functions suited for high amount of activities?

ぃ、小莉子 提交于 2020-01-25 10:19:06
问题 I have a scenario where I need to calculate 500k activities. All small calculations. Due to throttling I can only compute 30 simulataniously. Imagine following simple sample: [FunctionName("Crawl")] public static async Task<List<string>> RunOrchestrator( [OrchestrationTrigger] DurableOrchestrationContext context) { WriteLine("In orchistration"); var outputs = new List<string>(); // here i get 1 million jobs var jobs = await context.CallActivityAsync<List<Influencer>>("GetSocialAccountJobs", "

Only Fan-out (and forget) in Durable Functions

浪子不回头ぞ 提交于 2020-01-24 10:13:06
问题 I have an existing Function App with 2 Functions and a storage queue. F1 is triggered by a message in a service bus topic. For each msg received, F1 calculates a some sub-tasks (T1,T2,...) which have to be executed with varying amount of delay. Ex - T1 to be fired after 3 mins, T2 after 5min etc. F1 posts messages to a storage queue with appropriate visibility timeouts (to simulate the delay) and F2 is triggered whenever a message is visible in the queue. All works fine. I now want to migrate

Timeout in an Activity Function of Azure Durable Functions

ぃ、小莉子 提交于 2020-01-06 18:36:29
问题 In my activity function I am doing this do { await timeout(500); } while (await getStatus() === false); where, function timeout(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } getStatus() is a function that does a get request to see if process in other service is complete or not and returns true or false based on this. I need my activity function to wait before the process in other service is complete. But activity function execution by default is limited to 5 minutes. my

Azure durable function Microsoft.Azure.WebJobs.Host: Error indexing method

夙愿已清 提交于 2019-12-13 03:23:09
问题 I am using Azure durable function with Service Bus bindings . This project was working fine earlier but suddenly not sure what happened I am getting following exception "Microsoft.Azure.WebJobs.Host: Error indexing method " I am using following stack VS 2017 2.Azure Function 2.0 Microsoft.Azure.WebJobs.Extensions.DurableTasks 1.7.1 .Net core 2.2 C# I tried to by creating a new solution and manually copy the relevant files under new azure durable function project. Then it is working . But I am

Can Durable Activity Functions use binding attributes?

我只是一个虾纸丫 提交于 2019-12-11 21:30:08
问题 It appears that I cannot have an activity function which uses a Blob binding. The following gives runtime errors: [StorageAccount("AzureWebJobsStorage")] [FunctionName("LoadBlobFromBlobStorage")] public static async Task<string> Run([ActivityTrigger] string blobName, [Blob("containerName/directoryName/{blobName}", FileAccess.ReadWrite, Connection = AzureWebJobsStorage")] CloudBlockBlob blob, ILogger log) { ... } I get multiple failed binding error messages. Do Durable Functions not resolve

Azure Durable function. orchestration spawns many unwanted activities

点点圈 提交于 2019-12-11 09:55:54
问题 I am trying to do some data transformation with durable functions. For that I have a TimerTriggered function which calls an Orchestration function that then spawns the transformation activities. My problem is that immediately as the Orchestration function is called it then spawns a lot of activities before even getting to the part of the code which starts the function. My orchestration function is only supposed to start 3 activities as my dataList only contains 3 elements. But as can be seen,

ILogger not Injected in Durable Functions v2.0

核能气质少年 提交于 2019-12-11 04:46:42
问题 At the moment I'm trying to add an ILogger or ILogger<> to a Azure Durable Function so as to use logging in Activity Functions. Logging in the Orchestration Function works fine and is injected in the method itself, but attempts at constructor injection for ILogger always results in a Null Exception. builder.Services.AddLogging(); The above does not seem to work when added to the Startup file (Bootstrapper) and neither does variations on: builder.Services.AddSingleton(typeof(ILogger<>), typeof