azure-webjobs

Making a Webjob a singleton using multiple deployments using Web Apps in Azure

泪湿孤枕 提交于 2019-12-10 17:39:32
问题 With Azure WebApps I know I can make a WebJob a singleton by adding the "is_singleton": true to the WebJob settings.job file, and this works great if I have for example, 3 instances in a single WebApp deployment. However - how can I publish to two WebApps (use case, two different regions) and make the WebJob run as a singleton and only on one of the deployments. Example of desired behavior: Sydney Deployment My Singleton Webjob (Running) My other WebJobs that process a queue (Running)

Why is my Azure WebJobs “settings.job” file being ignored?

非 Y 不嫁゛ 提交于 2019-12-10 17:32:33
问题 When Azure WebJobs are stopped or restarted for whatever reason, there is a default grace period of 5 seconds before the host console process is terminated. Apparently it is possible to increase this time period by including a "settings.job" file with the WebJob when it is published to Azure, as explained here. Unfortunately I cannot get this to work for my website, and the shutdown period is always 5 seconds, despite this being a continuous WebJob that is published to a Basic App Service

WebJob “host is not running”. How to debug?

烈酒焚心 提交于 2019-12-10 17:21:40
问题 An Azure Websites WebJob is online with no deployment errors and no errors visible on the WebJob SCM consoles for the deployed WebJobs at any level except for this: "host not running" and some fuzzy info (see below). I can start the WebJob locally in VisualStudio 2015 and it runs perfectly, however I cannot attach the debugger to the deployed WebJob. The "parent" MVC 5 Website runs fine as a Azure Website and I can attach the debugger to it's controllers. What does "host not running" in this

How to publish manually created WebJobs to Azure

依然范特西╮ 提交于 2019-12-10 15:49:01
问题 I created a WebJobs app targeting .NET Core following this article: http://matt-roberts.me/azure-webjobs-in-net-core-2-with-di-and-configuration/ I had to do this manually because currently Visual Studio does not provide a way to create a WebJobs app in .NET Core but I can create a console app targeting .NET Core in Visual Studio 2017. Now, I want to publish my WebJobs console app to Azure but I'm NOT getting the option to Publish as Azure WebJob which Visual Studio typically gives -- see

Azure Function Structure

China☆狼群 提交于 2019-12-10 15:38:37
问题 I'm trying to wrap my head around how we're supposed to build Azure functions. I love the idea of building serverless, compact, single-function apps that respond to events. Here are the problems I'm running into: I have nice class libraries built in .NET Standard 2 that handle all my "backend needs" namely handling CRUD ops with Cosmos Db, Azure Table Storage, Azure SQL, Redis, Azure Storage. No matter what I did, I couldn't integrate these class libraries into an Azure Functions project.

Securely calling a WebSite hosted Web API from an Azure WebJob

妖精的绣舞 提交于 2019-12-10 13:41:19
问题 I have a continuously scheduled web job that's monitoring a message queue, pulling messages off and calling a Web API on the peer Web Site to process the messages (in this case using SignalR to send notifications to appropriate users). What would be the best way in this case to call the web API securely? The API being hosted in the web site is obviously exposed otherwise. Perhaps something using Basic Auth or storing a security token in config and passing it from the job to the web API. Or

Website not updated when deployed with a WebJob

安稳与你 提交于 2019-12-10 11:21:52
问题 I have a solution that has an ASP.NET MVC Web Application with source control in Visual Studio TFS online. The site is hosted in Azure, which deploys the site every time it is built in TFS online. Everything is working good. I then added a Web Job project to the solution using Add > New Azure WebJob project and I set it up with some help from this post on the azure blog. Since then, I noticed that any changes made to the web application does not reflect on the deployed site anymore. I don't

Does Azure start up another instance of a scheduled web job if it is already running?

[亡魂溺海] 提交于 2019-12-10 09:02:24
问题 I have a Azure web job that is scheduled to run every 5 minutes using the cron expression in the settings.job file. If the process doesn't finish within 5 minutes will Azure kick off another instance of the job or will it wait until the first one finishes? I would like to make sure it waits until the first one finishes so it isn't running multiple instances. 回答1: When a scheduled webjob is started, Azure places a lock file. This lock file will remain until the scheduled webjob is completed.

Ftp to external server in azure webjob not working

那年仲夏 提交于 2019-12-10 00:40:30
问题 I have a code which runs fine in local machine however in Azure it throws "Unable to connect to remote server", I 'm getting data from sql,processing it, and then uploading to a external server via ftp, is there any settings needs to be done for FTP in Azure ? Code : FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://ftp.example.com/remote/path/file.zip"); request.Credentials = new NetworkCredential("username", "password"); request.Method = WebRequestMethods.Ftp.UploadFile; using

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(