azure-webjobs

Can I easily stop/start Azure Webjobs without going through the UI or FTP?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 15:01:29
问题 The Azure management interface is abhorrently slow to load up the web jobs list, and the new portal just times out and fails 95% of the time. We have a lot of WebApps (often deployed per region) in Azure running web jobs. It's extremely cumbersome and slow to have to go through the UI to do all this. I know that the Kudu API offers start/stop mechanisms for web jobs and you can just drop a file called 'disable.job' in the job folder to stop it, but these all require going through the

Azure Web Job - Performance impact of multiple functions in the same web job and/or multiple web jobs in the same web app?

ε祈祈猫儿з 提交于 2019-11-29 14:03:46
There are 3 ways to deploy a new function via web job: Create a new web app, and deploy a web job with the function in it. Add a new function to an existing web job (so now you have multiple functions in one web job). Add a new web job to a web app (so now you have multiple web jobs in the same web app). All web jobs and web job functions that are on the same web app are hosted on the same VM, so maybe the material impact of all 3 is the same. But I wonder what is the difference. What guidance is there for deciding how I should add a new web job function to my cloud solution? New web app with

Relevant dependencies (DLL) not being copied when deploying using Visual Studio 2013

懵懂的女人 提交于 2019-11-29 11:42:51
In one of the webjobs I'm deploying, I'm referencing one of my class libraries (Core) that is taking care of running some process (in this case sending an email using SendGrid). When I deployed my webjobs manually (uploading .zip file) everything worked fine. I cleaned up the deployment and re-deployed using Visual Studio 2013 and the webjob started to have problems. The main issue here is that it's looking for the SendGrid dll that's referenced by my Core class library and not my Console app and it's not finiding it throwing the following error: "Unhandled Exception: System.IO

What happens to “in-progress” jobs when you deploy a webjob?

筅森魡賤 提交于 2019-11-29 11:17:26
Subject says it all really :) Say I've got a pretty busy Azure continuous webjob that is processing from an azure Queue: public static void ProcessQueue([QueueTrigger("trigger")] Info info) { .... } If I re-deploy the webjob, I can see that any currently executing job seems to be aborted (I see a "Never Finished" status). Is that job replayed after I release or is it lost forever? Also, is there a nice way to make sure that no jobs are running when we deploy webjobs, or is it up to the developer to code a solution to that (such as a config flag that is checked every run). Thanks When a WebJob

Cannot bind parameter 'log' to type TraceWriter

↘锁芯ラ 提交于 2019-11-29 10:55:51
Getting the below message when doing right click project -> Debug -> Start New Instance. [1/7/2018 6:48:54 AM] A ScriptHost error has occurred[1/7/2018 6:48:54 AM] Executed HTTP request: { [1/7/2018 6:48:54 AM] Microsoft.Azure.WebJobs.Host: Error indexing method 'TestFilesIngestJobs.RunScheduleAsync'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'log' to type TraceWriter. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e

Use Azure Application Insights with Azure WebJob

喜夏-厌秋 提交于 2019-11-29 10:49:05
问题 The Azure documentation covers many examples of integrating Azure Application Insights into different applications types, such as ASP.NET, Java, etc. However, the documentation doesn't show any examples of integrating Application Insights into a Azure WebJob. Does anyone have link to an example or article that covers how to integrate Azure Application Insights into an Azure WebJob that's built as a Console App? 回答1: I have written a console application that tracks events and metrics via

How to Enable/Disable Azure Function programmatically

╄→尐↘猪︶ㄣ 提交于 2019-11-29 10:46:08
Is there a way to programmatically enable/disable an Azure function? I can enable/disable a function using the portal under the "Manage" section, which causes a request to be sent to https://<myfunctionapp>.scm.azurewebsites.net/api/functions/<myfunction> The JSON payload looks a bit like: { "name":"SystemEventFunction", "config":{ "disabled":true, "bindings":[ // the bindings for this function ] } // lots of other properties (mostly URIs) } I'm creating a management tool outside of the portal that will allow users to enable and disable functions. Hoping I can avoid creating the JSON payload

Azure C# WebJob using ImageResizer not Properly Setting Content-Type

自闭症网瘾萝莉.ら 提交于 2019-11-29 05:17:53
I'm working on an Azure WebJob to to resize newly uploaded images. The resizing works, but the newly created images do not have their content type properly set in Blob Storage. Instead they are listed application/octet-stream. Here the code handling the resizing: public static void ResizeImagesTask( [BlobTrigger("input/{name}.{ext}")] Stream inputBlob, string name, string ext, IBinder binder) { int[] sizes = { 800, 500, 250 }; var inputBytes = inputBlob.CopyToBytes(); foreach (var width in sizes) { var input = new MemoryStream(inputBytes); var output = binder.Bind<Stream>(new BlobAttribute($

Publish simple Asp.Net Core App (.Net Framework) with WebJob

狂风中的少年 提交于 2019-11-29 04:50:17
I would like to create a simple ASP.NET Core Web Application (.NET Framework) and publish a WebJob alongside it to Azure. I'm using Visual Studio 2017, but the result seems to be the same in VS2015. To start, I create the corresponding project in VS2017: I select the basic web application template: At this point I get a bit lost. In the older Asp.Net MVC 5 approach, I used to be able to click on the Asp.Net project and find "Add => New Azure Webjobs Project". The WebJob would then always be linked in publishing and just "work". With the new Asp.Net Core approach, I can't seem to find an

Continuous WebJob with timer trigger

会有一股神秘感。 提交于 2019-11-29 03:56:22
I have written following functions in continuous web job : public static void fun1([TimerTrigger("24:00:00", RunOnStartup = true, UseMonitor = true)] TimerInfo timerInfo, TextWriter log) {//Code} public static void fun2([TimerTrigger("00:01:00", RunOnStartup = true, UseMonitor = true)] TimerInfo timerInfo, TextWriter log) {//code} where, fun1 is not getting called again (only once, after starting web job) and fun2 is getting called with 1 min trigger after every process gets completed. can anyone please explain why? Am I doing anything wrong? You should have a look at the documentation of the