azure-webjobssdk

Set nextVisibleTime in Azure Webjobs SDK

我怕爱的太早我们不能终老 提交于 2019-12-08 19:14:10
问题 I'm using Azure Webjobs to process messages from a queue. I saw that the Webjobs SDK processes any failed message again after 10 minutes, and it if fails 5 times it moves it to the poison queue (1). Also I can see the nextVisibleTime of the message in the queue, that is 10 minutes after the insertionTime (2). I want to use the AzureSDK error handling of the messages but I cannot wait 10 minutes for the message to be processed again. Is there any way I can set this nextVisibleTime to a few

Suppress logging in Azure Webjobs (“Executing: 'xxx' because New queue message detected on 'yyy'.”)

一世执手 提交于 2019-12-08 12:33:04
问题 Is there a way to suppress log entries of Executing: 'xxx' because New queue message detected on 'yyy'. ? I still want to see my logs (written to Console), however I'm not interested in seeing Executing (...) entries. Those do not provide me any value and those are the majority of the logs now. 回答1: You can control the Console log level globally via JobHostConfiguration.Tracing.ConsoleLevel . Those "Executing/Executed" messages are traced at the TraceLevel.Info level which is the default. You

Continuous WebJob stopping_wait_time ignored?

痞子三分冷 提交于 2019-12-08 04:00:43
问题 After my yesterday's question (Continuous WebJobs and CancellationToken) I thought now I've understand the handling of continuous WebJobs and graceful shutdown and did some testing. Additional Info With https://myWebJob.scm.azurewebsites.net/api/continuouswebjobs I get: { [some info ommited...] "type": "continuous", "error": null, "using_sdk": true, "settings": { "stopping_wait_time": 120 } } At Thu, 31 Dec 2015 07:00:23 GMT I put a Stop to the Server, the following entries in the Dash Board

Continuous Web Job with timer trigger and Blob trigger

别等时光非礼了梦想. 提交于 2019-12-07 18:18:51
问题 I have the following functions in the same web job console app that uses the azure jobs sdk and its extensions. The timed trigger queries an API end point for a file, does some additional work on it and then saves the file to the blob named blahinput. Now the second method "ProcessBlobMessage" is supposed to identify the new blob file in the blahinput and do something with it. public static void ProcessBlobMessage([BlobTrigger("blahinput/{name}")] TextReader input, string name, [Blob(

Basic of Azure WebJobs SDK

天大地大妈咪最大 提交于 2019-12-07 07:15:12
问题 I would like to know about JobHostConfiguration on Azure WebJobs SDK. Where I can find the config ? is it on app.config ? How can JobHostConfiguration identified this is IsDevelopment or not ? I cannot find it on app.config What config that JobHostConfiguration read ? Thank You 回答1: Where I can find the config ? is it on app.config ? Yes, it is in app.config file. You also could add some new configs manually in this file. How can JobHostConfiguration identified this is IsDevelopment or not ?

Azure WebJob concurrency when using ServiceBusTrigger

余生颓废 提交于 2019-12-07 04:07:21
问题 I have been using Azure Storage Queues to feed a WebJob, using the QueueTrigger attribute. I configure my QueueTrigger to dequeue a number of items for concurrent processing, like this: public static void Main() { JobHostConfiguration config = new JobHostConfiguration(); config.NameResolver = new QueueNameResolver(); config.Queues.NewBatchThreshold = 10; JobHost host = new JobHost(config); host.RunAndBlock(); } public static void ExecuteStorageQueueItem([QueueTrigger("%AzureQueueName%")]

Best Way to Pass Multiple Blob Inputs to a QueueTrigger Azure Function

谁说胖子不能爱 提交于 2019-12-07 01:37:17
问题 The Problem Upon a trigger, generate 3 XML files and once complete, ftp them to a site. The Current Approach I have a HTTP Trigger Azure function that when run will construct 3 XML files and save these to an Azure Storage Blob container. Because of the multiple outputs, and the need to control the output path/filenames, I use the imperative binding approach and use the IBinder outputBinder in my function. This all works just fine. An example of the output path in the blob storage is export

Azure Web Jobs and SignalR memory leak

送分小仙女□ 提交于 2019-12-06 13:17:02
So I have some webjobs that occasionally connect to a signalr hub and broadcast a message. Below is just an example of one, in this case its a simple web job for development with the TimerTrigger attribute that is set to run continuously every 20 seconds. Like that shown in the code below. public static void Main() { JobHostConfiguration config = new JobHostConfiguration(); config.Tracing.ConsoleLevel = TraceLevel.Verbose; config.UseTimers(); if (config.IsDevelopment) { config.UseDevelopmentSettings(); } var host = new JobHost(config); host.RunAndBlock(); } public static void ProcessPush(

Disable a Triggered Azure WebJob

可紊 提交于 2019-12-06 08:51:40
问题 I've got a webhook-triggered Azure WebJob. For... reasons, I do not have control over the system that is sending the webhooks. One webhook per day is sent. It is the only WebJob hosted by the WebApp. During testing I wanted to disable this WebJob, so I stopped the WebApp. Much to my surprise, the WebJob ran even though the WebApp was disabled. So my question is two-fold: Is the ability to trigger a WebJob while a WebApp is disabled intentional, or did I encounter some sort of bug? If this is

Service Bus message abandoned despite WebJobs SDK handler completed successfully

江枫思渺然 提交于 2019-12-06 06:54:46
问题 I have implemented a long running process as a WebJob using the WebJobs SDK. The long running process is awaited because I want the result. public async Task ProcessMessage([ServiceBusTrigger("queuename")] MyMessage message) { await Run(message.SomeProperty); // takes several minutes // I want to do something with the result here later.. } What I can't figure out is why the message sometimes is abandoned which of course triggers the handler again. I've tried to debug (locally), setting