azure-webjobssdk

Why is TimerTrigger in AzureWebJob is being triggered twice?

十年热恋 提交于 2019-12-11 13:58:31
问题 I am using an Azure WebJob function with the "TimerTrigger" attribute to queue up emails for some users every morning at a certain time. Based on reading, I understand this should behave as a Singleton and only ever trigger once across all scale-out instances. However, users report getting two emails, and logging shows that the function is being called twice. Why is this? Here is the relevant function: public static void EnqueueAllSummaries([TimerTrigger("0 15 8 * * *")] TimerInfo timer,

Time limit on Azure Webjobs triggered by Queue

百般思念 提交于 2019-12-11 12:54:21
问题 Are there any time limits on the queue triggered function inside an azure web job. My function takes about 20-30 mins since it needs to go over a lot of records in the DB. The function status in the end is Never Finished. I put in the settings.job file with { "stopping_wait_time": 1800 } - with no effect. But within five minutes or so its status is set to Never Finished. I searched and yes found some ppl asking similar questions - with no definitive answers. I found some exceptions in the

How to specify AzureWebJobsStorage in latest azure webjob 3.03

风流意气都作罢 提交于 2019-12-11 09:54:14
问题 I updated my old azure webjob code to package to 3.03 and then it is just not working. I managed to fix all compile-time errors, but when running locally, it throws this error: Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexingException HResult=0x80131500 Message=Error indexing method 'MvQueueProcessorV2.ProcessMVRequest' Source=Microsoft.Azure.WebJobs.Host StackTrace: at Microsoft.Azure.WebJobs.Host.RecoverableException.TryRecover(ILogger logger) in C:\projects\azure-webjobs-sdk-rqm4t

BlobTrigger triggering job multiple times in Azure WebJobs 0.3 Beta

扶醉桌前 提交于 2019-12-11 09:13:57
问题 After upgrading to WebJobs 0.3 beta, Azure WebJobs is calling my method (with BlobTrigger as input) multiple times when a blob is posted to storage. This happens both when testing locally at the Console, and in Azure. In my case, I am taking the BlobTrigger, and then posting to a queue, like so: public static void ProcessFactoryFileSubmission( [BlobTrigger(blobs.RESPONSE + "/{requestId}_{factoryId}_{filename}")] ICloudBlob blob, [Table(tables.PACKAGE)] CloudTable table, [Queue(queues.FACTORY

How to configure Receiver batch size for Azure Functions EventHub listener?

风格不统一 提交于 2019-12-11 08:19:52
问题 In the latest Microsoft.Azure.WebJobs.ServiceBus package, it gives you the ability to receive batches of messages from eventhubs. I would like to set how many messages I want to receive in a batch. The core ServiceBus library allows you to overload the Receive() function and provide the batch size. How does one do this in the initial config of an EventHubs receiver, or is something else required? 回答1: You can do this in Functions via the eventHub configuration block in host.json as described

Want Azure webjobs to maintain running state (Running or Stopped) following publishing of web app

穿精又带淫゛_ 提交于 2019-12-11 04:56:22
问题 I'm deploying a web application and various associated (continuous) webjobs to Azure using Visual Studio 2015. Until very recently my observation was that following the deployment process the webjobs would maintain their state; if the job was running, it would be restarted if the code was changed. If the job was Stopped, the code would update and the webjob would remain in the Stopped state. The behavior I'm seeing now now is that the Stopped webjobs are starting following deployment. This is

Azure webjobs output logs indexing taking very long

冷暖自知 提交于 2019-12-11 04:03:21
问题 I have a frequently running triggered webjob (every 3 minutes) and others that are triggered weekly/daily and some running continuously. If I visit https://xxxx.scm.azurewebsites.net/azurejobs/#/functions the site takes forever to load as it tries to load and index function invocations and these get overwhelmed by the output from the frequent job. My questions: How can I set the logging retention for a particular webjob? Anything I write to the console shows up in the Webjob run details page

Azure WebJobs SDK 3, trying to add a BlobTrigger and related connection string

空扰寡人 提交于 2019-12-09 21:47:43
问题 The old way of doing things looked as so: var jobConfig = new JobHostConfiguration(cfg.DocumentDatabase.BlobStorageServer) { NameResolver = new Support.BlobNameResolver(_env) }; jobConfig.Queues.MaxPollingInterval = TimeSpan.FromSeconds(_pollSeconds); _wjHost = new JobHost(jobConfig); I am trying to translate this to the new way in 3.0, and this is how far I have come: _wjHost = new HostBuilder().ConfigureWebJobs(b => { b.AddAzureStorage(x => { x.MaxPollingInterval = TimeSpan.FromSeconds(

Azure Webjobs: One Job with several Functions, or several Jobs with 1 function each?

房东的猫 提交于 2019-12-09 15:25:18
问题 How do I decide between creating several WebJobs with 1 function each and bundling several functions into one or only a few WebJobs? Thanks 回答1: There is no straight answer to your question. Sorry. Usually you group functions by workflow or role. For example if you have a workflow that contains a function that resizes an image, then a function that applies a watermark and another one that replicates the images then it makes sense to put all the functions together because they are related. You

How can I use a BlobTrigger to bind to CloudBlockBlob in an Azure Function?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 21:01:04
问题 I have the following function in my project: [FunctionName("my-func")] public static async Task Run([BlobTrigger("data/{name}")] CloudBlockBlob blob, string name, TraceWriter log) { log.Info($"Started Processing: {name}"); await blob.DeleteAsync(); log.Info($"Finished Processing: {name}"); } When I attempt to run the function locally using v1.0.4 of the Azure Functions CLI I get this error: Microsoft.Azure.WebJobs.Host: Error indexing method 'SampleFunction.Run'. Microsoft.Azure.WebJobs.Host: