azure-webjobs

Azure WebJob fail to start

孤人 提交于 2019-12-12 00:55:21
问题 I have created an Azure WebJob in Visual Studio 2015 and deployed it to Azure. When trying to run the WebJob I get this error: [03/12/2017 22:47:46 > 070c62: SYS INFO] Status changed to Running [03/12/2017 22:47:47 > 070c62: ERR ] [03/12/2017 22:47:47 > 070c62: ERR ] Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.HostingProcess.Utilities.Sync, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its

Can't target staging slot Octopus

允我心安 提交于 2019-12-11 23:54:15
问题 I have set up a deployment in Octopus with the intention of blue/green deployments. I have tried two different approaches but neither of them seem to be taking any notice of the slot I have set up for it. The two approaches are: deploy to staging swap slots or deploy to staging deploy to production for both of these I have the Deployment Slot set: but neither deploy seems to take any notice of it. If I change the name to anything else i.e. -stagingslot the deployments fail. The logs I get

How to know from which point HttpClient task cancellation is triggered

别等时光非礼了梦想. 提交于 2019-12-11 19:52:10
问题 I have the following code to fetch the bearer token and then call the Web API in a c# application. public async Task<HttpResponseMessage> SendHttpRequest() { HttpResponseMessage response = null; try { HttpClient client = new HttpClient(); string accessToken = await GetBearerToken(resourceUrl, clientId, clientSecret, tokenProviderUrl); if (!string.IsNullOrEmpty(accessToken)) httpRequest.Headers.Add("Authorization", ("Bearer " + accessToken)); response = await client.SendAsync(httpRequest); }

How to schedule python web jobs on azure

元气小坏坏 提交于 2019-12-11 19:48:33
问题 I have python project which has main python file start.py and run.cmd . run.cmd file contains the path of the python on azure web app which is below: D:\home\Python364x64\python.exe start.py I created a webjob on azure and with type as Triggered and triggers as schedule . Cron expression I set is 0 */5 * * * * so that it runs every 5 mins for testing purpose. It was getting executed every 5 mins. Now I have change the cron expression to 0 0 1 * * * so that it runs every 1AM but the problem is

Is there a way to dynamically determine the amount and names of queues triggered in Azure webjob during startup time?

若如初见. 提交于 2019-12-11 17:55:08
问题 I am using an Azure webjob with queue triggered functions to listen on several Azure queues. The processing method for each queue is identical (but the queues still need to be separate). I was wondering if there is a way to store the list of queue names in configuration and dynamically create functions that are triggered on those queues during startup time? I know it is possible to do this for a single queue using INameResolver, but I couldn't find a solution for multiple queues. 回答1:

Azure Webjob - Per Request Lifetime?

China☆狼群 提交于 2019-12-11 17:30:18
问题 I have a console app that I'm using for an azure webjob. I need to have a unique nhibernate session per azure webjob request . I'm using autofact to manage DI. How can I get Per Request Lifetime instancing in azure webjobs? Inherently a console app doesn't have this. Do I need to change project types? I've seen several answers on how to do something similar here and here. But they basically boil down to passing in a container as a parameter to functions. That's not really instance per request

Triggered Web Job Executing Completely, and then Aborting with Timeout 121 seconds later

≡放荡痞女 提交于 2019-12-11 17:19:47
问题 I have a webjob which is successfully being triggered in Azure when a new item is added to the storage queue. When it is triggered, I check the logs and all the code written has executed properly, but the web job stays in a "still executing" state, and after 121 seconds after execution it aborts. Here is the method that gets triggered followed by the log file where you can see "Start Processing Content" is written to the log and "Processing Content Has Completed" was written to the log. That

Azure Web Jobs cannot read csv properly

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 15:39:01
问题 I am using the latest version of CsvHelper library and yet Azure WebJob making troubles reading my csv file. It says not valid DateTime format. Though I am 101% sure that my csv has the right DateTime format. I believe that the CsvHelper causes the issue but I don't really know.. If more information is needed please let me know. 回答1: For such issue, it would be diffcult to us to answer if we don't have a sample that can reproduce the issue. So here I will just share you an effective way to

Azure SQL: What is the cost of running a specific SQL query like create database as copy

梦想的初衷 提交于 2019-12-11 15:31:44
问题 What are the costs of running the following operation in Azure? drop database MyDB; create database MyDB as copy of MyDB_Clean; The scope of the above operation is to restore an existing database to its clean version to improve web site performance. It will run once every day via an Azure web job and would like to assess if this would be feasible in terms of costs. MyDB_Clean used space = 35 MB, allocated space 48 MB, using Tiers S0/S1/S2 回答1: What are the costs of running the following

Can a Azure LogicApps stop a webjob?

旧时模样 提交于 2019-12-11 14:40:10
问题 Azure LogicApps time! In my previous post my problem was to understand how to run a webjob . My problem is: how can I stop a webjob ? In another posts in Stackoverflow, people send a DELETE request to stop a webjob like $username = $website.PublishingUsername $password = $website.PublishingPassword $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password))) $ps = Invoke-RestMethod -Uri "$apiBaseUrl/processes" -Headers @{Authorization=(