azure-webjobs

Azure Triggered Webjobs Scope for Dependency Injection

雨燕双飞 提交于 2019-11-27 03:39:38
问题 I've read and asked some questions on how to use DI using WebJob and especially Triggered Webjobs. SimpleInjector - Azure WebJob with TimerTrigger - Register IDisposable Dependency injection using Azure WebJobs SDK? I still try to figure out how to integrate gracefully DI in triggered webjobs and @Steven asked me a good question : Isn't there a way to wrap the execution of your service in some scope? For instance, MVC and Web API have an IDependencyScope abstraction for this. This notifies

Deploy Azure WebJob using VSTS

故事扮演 提交于 2019-11-27 02:52:00
问题 I'm having some issues deploying an Azure WebJob using Visual Studio Team Services (VSTS). The WebJob seems to be deployed successfully but it breaks the Azure website that is hosted in the same App Service! I don't have this problem if I deploy using VS2013. This is my build task that generates the WebJob deployment package: And this is my deployment task: There are no errors when I deploy the Azure WebJob. If I go to the Azure Portal I see the WebJob is there, and it runs successfully.

SQL Database access from a WebJob in Azure

℡╲_俬逩灬. 提交于 2019-11-27 02:48:57
问题 I plan to use WebJobs as a lightweight substitute for NServiceBus but wanted to first verify that routine SQL Azure Database queries can be made from a triggered WebJob handler? My database access will be through EntityFrameworks. This SO thread indicates that WebJobs does not support SQL Database but I hope this just means that SQL Database cannot be used as a triggering mechanism for a WebJob handler? Azure Web Job - How to connect to an Azure MS SQL Database? I have not found a WebJob

How to prevent Azure webjobs from being swapped in Azure website production <--> staging slots

倖福魔咒の 提交于 2019-11-27 02:09:42
问题 I have an Azure website with a production and staging slot with multiple instances. I run several Azure webjobs on the site, some of which are triggered others that are continuous. I understand triggered webjobs will only run once on one instance. My current setup is: Production site has no deployment other than swapping from staging Staging website is setup to continuous deployment from bitbucket Webjobs are deployed from within VS to production slot using "publish to Azure" (since AFAIK

How do I write to the logs in Azure WebJobs from a C# console app?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 01:00:16
问题 I'm testing out Azure Webjobs. I wrote a console application which polls a SQL database for new work and processes it. I'm not using the WebJobs SDK because it only supports Azure Storage. I upload the job, it runs, and then it fails with a exception that says it wasn't able to connect to the SQL Database instance. I'm wondering what connection string is being used; is it getting the connection string from the Azure Website. The logs give me this: [03/14/2014 22:24:25 > 512206: SYS INFO]

Azure Webjob timer trigger does not fire

梦想与她 提交于 2019-11-26 22:02:18
问题 We have two deployments (Prod and Test) of Azure Webjob running with TimerTrigger. Both the web apps have single instance. According to this article, TimeTriggers use singleton locks to make sure no parallel invocation. These two instances use the same storage accounts. The issue we are facing is that only one of the deployments seem to acquire the lock while other is unable to acquire the lock. If we stop the first webjob the second acquires lock and starts processing and vice-versa. Does

Initiate a message from bot to user on BotFramework

这一生的挚爱 提交于 2019-11-26 20:57:19
问题 I have a bot built on BotFramework 3.5 and hosted on Azure as a WebApp. I didn't face any problems with implementation of scenarios where the bot needs to respond to user's input. However there is a need to teach him to start conversations by some schedule. To reach the goal I created a WebJob which is a simple console app basically. Here is a code used to initiate a message from bot to user: var botAccount = new ChannelAccount(id: from); var userAccount = new ChannelAccount(id: to); var

How to set Azure WebJob queue name at runtime?

断了今生、忘了曾经 提交于 2019-11-26 18:12:23
问题 I am developing an Azure WebJobs executable that I would like to use with multiple Azure websites. Each web site would need its own Azure Storage queue. The problem I see is that the ProcessQueueMessage requires the queue name to be defined statically as an attribute of the first parameter inputText . I would rather have the queue name be a configuration property of the running Azure Website instance, and have the job executable read that at runtime when it starts up. Is there any way to do

Dependency injection using Azure WebJobs SDK?

与世无争的帅哥 提交于 2019-11-26 17:22:30
The problem is that the Azure WebJobs SDK supports only public static methods as job entry-points which means there is no way of implementing constructor/property injection. I am unable to find anything about this topic in official WebJobs SDK documentation/resources. The only solution that I came across is based on service locator (anti) pattern described on this post here . Is there a good way to use "proper" dependency injection for projects based on Azure WebJobs SDK? Azure WebJobs SDK now supports instance methods. Combining this with a custom IJobActivator allows you to use DI. First,

Azure Webjobs vs Azure Functions : How to choose

↘锁芯ラ 提交于 2019-11-26 14:59:23
问题 I've created some Azure Webjobs that use triggers and I've just learnt about Azure Functions. From what I understand Azure Functions seem to overlap with Azure Webjobs features and I have some difficulty to understand when to choose between Function and Webjob: Unlike Webjobs, Functions can only be triggered, it hasn't been designed to run continuous process (but you can write code to create a continuous function). You can write Webjobs and Functions using many languages (C#, node.js, python