azure-functions

Can you rate limit an Azure Function or output of a Storage Queue?

偶尔善良 提交于 2021-01-27 20:13:27
问题 I have a Storage Queue triggered Python Azure Function that submits a job to a third-party rate-limited API (1 request/minute). The queue that triggers the function will periodically receive a burst of messages, so I need a way to ensure that the function will be triggered immediately upon receiving the first message, 1 minute later on the second message, 2 minutes later on the third message, etc. until the queue is empty. Is it possible to either rate-limit the queue or the function so I am

azure set environment variable programmatically to disable an azure function

社会主义新天地 提交于 2021-01-27 18:54:35
问题 I have an azure API and an Azure function. When certain logic is passed into the API, I want it to disable the Azure function. This post suggest disabling the function using environment variables. This works, but in my case, I cant disable this via manual intervention, I need the api to set this variable. Is this possible ? 回答1: Your options are somewhat limited and will entail modifying some files that will enable or disable your functions. Fortunately, you can easily to this

Cross-Origin Request Blocked Microsoft Azure Function

左心房为你撑大大i 提交于 2021-01-27 16:47:42
问题 When trying to call a remote Azure function from my client side, I get this error (URL censored): Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://x.x.com (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). For testing purposes I have set CORS allowed origins in the portal to * as shown below: This is my client side code: $.get({ url: "https://x.x.com", crossDomain: true, data: { weight: weight, height: height }, success: function

Cannot use JpegBitmapEncoder in Azure Function

﹥>﹥吖頭↗ 提交于 2021-01-27 12:03:49
问题 While testing Azure Functions, I wrote the following blob-triggered code: #r "System.Drawing" #r "PresentationCore" #r "WindowsBase" using System.Drawing.Imaging; using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; public static void Run(Stream imageStream, string providerName, string imageKey, string extension, Stream outputStream, TraceWriter log) { log.Info($"Function triggered by blob\n Name:{imageKey} \n Size: {imageStream.Length} Bytes"); var decoder =

Cannot use JpegBitmapEncoder in Azure Function

爷,独闯天下 提交于 2021-01-27 11:57:37
问题 While testing Azure Functions, I wrote the following blob-triggered code: #r "System.Drawing" #r "PresentationCore" #r "WindowsBase" using System.Drawing.Imaging; using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; public static void Run(Stream imageStream, string providerName, string imageKey, string extension, Stream outputStream, TraceWriter log) { log.Info($"Function triggered by blob\n Name:{imageKey} \n Size: {imageStream.Length} Bytes"); var decoder =

Azure Web Deploy “Publish Failed”

别等时光非礼了梦想. 提交于 2021-01-27 09:35:48
问题 Hello my fellow developers! I am currently struggling with a problem in the latest Visual Studio 2017 Professional - Version 15.8(.1). Since The Update to Version 15.8, I am unable to publish any Azure Function via Web Deploy. Every time i press the "Publish" button, I simply get an error window saying: "Publish failed". The Output window stays empty, where normally I would get all the build and publishing output. What I've tired: Cleaned the solution; deleted %temp%; deleted the publishing

Azure Web Deploy “Publish Failed”

二次信任 提交于 2021-01-27 09:35:33
问题 Hello my fellow developers! I am currently struggling with a problem in the latest Visual Studio 2017 Professional - Version 15.8(.1). Since The Update to Version 15.8, I am unable to publish any Azure Function via Web Deploy. Every time i press the "Publish" button, I simply get an error window saying: "Publish failed". The Output window stays empty, where normally I would get all the build and publishing output. What I've tired: Cleaned the solution; deleted %temp%; deleted the publishing

Azure alert only fired once

旧城冷巷雨未停 提交于 2021-01-27 05:47:42
问题 I have implemented an Azure alert that should fire when a Application Insights metric is greater than zero. The metric is the number of items in a Azure poison queue. The metric is calculated by a Azure Function described in this article: https://www.scaling-to-the-sky.com/2018/03/08/poison-queue-monitoring-with-azure-functions/?unapproved=160&moderation-hash=072116753136d2008f5e63a856d8e4b0#comment-160. The alert has only fired once despite the condition being met on several occasions. I don

Azure alert only fired once

左心房为你撑大大i 提交于 2021-01-27 05:47:07
问题 I have implemented an Azure alert that should fire when a Application Insights metric is greater than zero. The metric is the number of items in a Azure poison queue. The metric is calculated by a Azure Function described in this article: https://www.scaling-to-the-sky.com/2018/03/08/poison-queue-monitoring-with-azure-functions/?unapproved=160&moderation-hash=072116753136d2008f5e63a856d8e4b0#comment-160. The alert has only fired once despite the condition being met on several occasions. I don

Azure Function deployments cause brief 503 errors even when auto swap is turned on

流过昼夜 提交于 2021-01-27 05:28:14
问题 I'm deploying updates to my Function app through the VS publish window. I set up a deployment slot with auto swap turned on. My updates through VS are going to the slot. The problem is, right after the publish is successful and when I test my API endpoints, I briefly receive 503 errors. I was under the impression that auto swap was seamless and end-users would not experience such interruptions. Am I missing something? How can I make my deployments unnoticeable to the users? 回答1: Switching to