azure-webjobs

IS Azure Webjobs have its own memory allocation?

断了今生、忘了曾经 提交于 2019-12-13 14:41:12
问题 I am new to Azure web-jobs. When I am working with web-jobs I have come up with an question that whether web-job have its own memory allocation like process? we are creating web-jobs under website(web app) so for website a separate memory will get created.And then we are creating multiple web-jobs under that website in azure. so if static class gets instanciated under azure website instance.then web-jobs which uses that static class concurrently,will leads to data loss? like this eg: website

Azure WebJobs - Can I use Async Methods?

大城市里の小女人 提交于 2019-12-13 11:54:01
问题 I was wondering if the Azure WebJobs SDK can trigger async methods? Currently I have a method that looks like the following: class Program { static void Main(string[] args) { var host = new JobHost(); host.RunAndBlock(); } public static void ProcessStuff([QueueInput("myqueue")] string msg) { var tsk = ProcessStuffAsync(msg) .ContinueWith(x => HandleAsyncError(x), TaskContinuationOptions.OnlyOnFaulted); tsk.Wait(); } public static async Task ProcessStuffAsync(string msg) { // do some async

Microsoft.Web.WebJobs.Publish producing duplicate assemblies in deploy package

社会主义新天地 提交于 2019-12-13 11:45:13
问题 I have a large number of Azure WebJobs that all deploy to a single Azure App Service, along with a Website on the same Azure App Service. Each WebJob all use the WebJobs SDK and the Microsoft.Web.WebJobs.Publish nuget package (we are up-to-date with version 1.0.13) to package them up for deployment. The following are the MSBuild arguments we use in the CI build (VSTS) to produce the deploy package: /p:DeployOnBuild=true /p:PublishProfile=Release /p:WebPublishMethod=Package /p

Azure WebJob fails on exit code 532462766

人盡茶涼 提交于 2019-12-13 09:25:38
问题 I am taking a console app I have that loads new data into a database, and am turning it into a web job that runs at 2am so the stored data is updated daily. The console app works fine locally and is using an Azure SQL database. When running the webjob it fails with this message: [09/22/2016 20:25:39 > 44575f: SYS ERR ] Job failed due to exit code -532462766 Through some research it looks like the webjob doesn't have my app.config file and thus is missing the correct connection string, but I'm

Laravel 5.1 Background Task that Queries Database Fails to Work when hooked to an Azure Web Job

匆匆过客 提交于 2019-12-13 08:26:04
问题 I am having a strange problem using WebJobs on Azure to run Laravel Background tasks. I have this code in my Laravel ExpireContactsFromDatabase command's handle() method public function handle() { * Update contacts that are old and past their expiry date but that have not been deleted * Set their deleted at to the current timestamp */ $contact = Contact::where('expiry_date', '<=', date('Y-m-d H:i:s')) ->whereNull('deleted_at') ->update(array('deleted_at' => date('Y-m-d H:i:s'))); Log::info(

Azure web job stops running

江枫思渺然 提交于 2019-12-13 07:08:07
问题 I have a PowerShell script that runs every 5 minutes via the Web Job functionality of a Web App. Along with the Powershell script I have a settings.job with the following config, which is what makes it tick rather than configuring it as part of the Web job setup: { "schedule": "0 */5 * * * *" } The job runs successfully each 5 mins for a few hours, but i notice each morning that is has stopped. I'm thinking maybe as a result of an IIS Recycle (?) the job is stopping and then I have to

Any Example of WebJob using EventHub?

笑着哭i 提交于 2019-12-13 06:40:58
问题 I've tried to come up with something from the example in the WebJobsSDK gitHub var eventHubConfig = new EventHubConfiguration(); string eventHubName = "MyHubName"; eventHubConfig.AddSender(eventHubName,"Endpoint=sb://test.servicebus.windows.net/;SharedAccessKeyName=SendRule;SharedAccessKey=xxxxxxxx"); eventHubConfig.AddReceiver(eventHubName, "Endpoint=sb://test.servicebus.windows.net/;SharedAccessKeyName=ReceiveRule;SharedAccessKey=yyyyyyy"); config.UseEventHub(eventHubConfig); JobHost host =

Associating WebJob with Web App in Visual Studio & Azure Pipeline

若如初见. 提交于 2019-12-13 04:34:59
问题 I am trying to associate an existing WebJob (created with Azure WebJob template of net461) project, with an existing Web Application, by following https://docs.microsoft.com/en-us/azure/app-service/webjobs-dotnet-deploy-vs link. However, Problem 1 : Visual Studio shows me the "Add->Existing Project as Azure WebJob" the first time, then when I click on that menu, it throws an error saying "command is not applicable for the selected project". After that, it never shows that menu, unless I

How do I remote debug an on demand web job deployed with a web app in azure app service?

删除回忆录丶 提交于 2019-12-13 00:13:51
问题 According to this msdn link quoting Remote debugging only works with continuous WebJobs. Scheduled and on-demand WebJobs don't support debugging. Is there a way to remote debug azure on demand webjob? I have VS 2017 Community. I've tried attach to process to my website but as soon as my web job is called from my site. I loose debugging in VS. Please help. 回答1: On-demand WebJobs (aka Triggered) only run when they are invoked (whether manually or on timer). So there is no running process to

How to integration test Azure Web Jobs?

只谈情不闲聊 提交于 2019-12-12 20:25:41
问题 I have a ASP.NET Web API application with supporting Azure Web Job with functions that are triggered by messages added to a storage queue by the API's controllers. Testing the Web API is simple enough using OWIN but how do I test the web jobs? Do I run a console app in memory in the test runner? Execute the function directly (that wouldn't be a proper integration test though)? It is a continious job so the app doesn't exit. To make matters worse Azure Web Job-functions are void so there's no