azure-webjobs

Visual Studio Team Services, continuous deployment and WebJobs

自古美人都是妖i 提交于 2019-12-06 05:54:33
问题 Has anyone managed so set up a working deploy pipeline using Visual Studio Team Services RELEASE tasks? All the info I can find seem to be based on the Nuget publishing package which takes its parameters directly from the source. I am trying to get this working in the proper release workflow with multiple environments, dev to QA to prod pipeline etc. The tooling does not seem to be in place for that scenario - or at least, I cannot figure out any combination of parameter where the powershell

Can I create an Azure Webjob that exposes functions to the dashboard but doesn't use Azure Storage?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 05:32:55
问题 I want to create an Azure Webjob to serve batch processing needs (specifically it will continuously iterate over a SQL Azure database table picking up certain records, performing some operations and then updating the table). I have no need for Azure storage. In this scenario can I still expose my methods to the Azure function invocation dashboard? Or are methods that have the Azure storage attributes the only ones that get exposed? As an example I might have a function:

Entity Framework bulk insert unreal slow

痞子三分冷 提交于 2019-12-06 04:57:13
I am using EF 6. I am trying to insert around 200.000 entities while saving changes to database after each 100 entities. The issue is it took 11 hours to save 50.000 entities, and it is still running behind. I am running this with WebJobs, and job is published on the same azure webapp as main website. Is the issue because of that and WebJob don't have enough resources, or saving after 100 entities, or the approach? Method public void SaveLeadsForBuyer(ISenderModel model) { var rowCounter = 0; foreach (var deliveryRecord in model.Customers.Select(customerModel => new DeliveryRecord() { BuyerId

Running Azure WebJob without queue

蓝咒 提交于 2019-12-06 03:46:08
问题 Is there a way to schedule a job without having listen to the queue? I mean I would like to run it every hour or so and do something, regardless of the queue. Does that even make sense? One solution I can think of is to queue a message to itself each time the job is done, but that doesn't look like a clean solution to me. 回答1: Create a scheduled job with a 1 hour frequency and use Host.Call to invoke the function. See the ManualTrigger function in this code sample 回答2: Of course, no need to

Continuous Web Job with timer trigger and Blob trigger

江枫思渺然 提交于 2019-12-06 03:33:18
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("foooutput/{name}")] out string output) {//do something } public static void QueryAnAPIEndPointToGetFile(

Azure WebJobs publishing error

江枫思渺然 提交于 2019-12-06 03:27:55
We have a webapp deployed with a production slot and a development slot, for both we've created several webjobs (both continuous and scheduled) and we want to deploy them manually (without being linked to the webapp deploy) so the process we follow for deployment is: 1 -> Deploy WebApp 2 -> For each WebJob: Right Click on the project + Deploy as Azure WebJob + Select proper slot + Publish We are able to publish for the production slot without any problems, but when it comes to the development slot the following error shows up over and over again: C:[...]\packages\Microsoft.Web.WebJobs.Publish

Azure WebJobs - where hosted? Are they safe as long-running processes?

前提是你 提交于 2019-12-06 02:20:37
问题 From Azure WebSite Always On and Meaning of "Always On" setting on Azure Web Site I assume that Azure WebJobs are hosted in IIS and uses IIS resources (and this our website resources). Furthermore, in the pricing page: http://azure.microsoft.com/en-us/pricing/details/websites/ there is a statement: Run custom executables and/or scripts on demand, on a schedule, or continuously as a background task within your Websites instance. Always On is required for continuous WebJobs execution. Azure

Graceful Shutdown of Azure WebJobs

大憨熊 提交于 2019-12-06 00:42:12
问题 I'm planning to use a continuous Azure WebJob to send emails and push notifications. I understand that WebJobs will be started and stopped from time to time for various reasons. That's fine, but I would like to have the opportunity to "clean up" prior to the job getting shut down. That way my WebJob can update the status of database records or delete queue items that have already been processed in each batch so duplicate messages won't get sent the next time the job runs. As a shot on the

Use a client certificate in a WebJob

情到浓时终转凉″ 提交于 2019-12-05 20:04:25
I have a web job running on an Azure web app. I web job needs to access a client certificate for outbound traffic encryption. How can I access a client certificate from an Azure web job? I tried installing the certificate on the host web app and access the certificate this way: private static X509Certificate2 LoadCertificateFromStore(string certificateThumbprint){ var store = new X509Store(StoreLocation.CurrentUser); try { store.Open(OpenFlags.ReadOnly); var certCollection = store.Certificates; var currentCertificate = certCollection.Find(X509FindType.FindByThumbprint, certificateThumbprint,

CancellationToken doesn't get triggered in the Azure Functions

我只是一个虾纸丫 提交于 2019-12-05 13:23:34
I've got this simple Azure Function: public static class MyCounter { public static int _timerRound = 0; public static bool _isFirst = true; [FunctionName("Counter")] //[TimeoutAttribute("00:00:05")] public async static Task Run([TimerTrigger("*/10 * * * * *")]TimerInfo myTimer, TraceWriter log, CancellationToken token) { try { log.Info($"C# Timer trigger function executed at: {DateTime.UtcNow}"); if (_isFirst) { log.Info("Cancellation token registered"); token.Register(async () => { log.Info("Cancellation token requested"); return; }); _isFirst = false; } Interlocked.Increment(ref _timerRound)