Azure function timer trigger doesn't send data to the database until after a manual update in the portal !

Nourdine_HR 1 Reputation point
2022-06-13T10:58:35.37+00:00

Hello Community;
Please, I created a python script that retrieves data in real time and then I share it in a timer trigger function with a schedule of 2 minutes, the thing that works well is that all the data is sent to my database (Postgresql), but the problem is that the data does not transfer anymore until after a manual update somewhere in the azure portal.
if someone can help and tell me where the problem comes from, i would be gratful.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,103 questions
Azure Time Series Insights
Azure Time Series Insights
An Azure internet of things (IoT) analytics platform to monitor, analyze, and visualize industrial IoT analytics data at scale.
78 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,708 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,481 Reputation points
    2022-06-15T06:38:48.12+00:00

    Hi @Nourdine_HR ,

    Thanks for reaching out to Q&A.

    This appears to be a sync trigger issue. The reason the timer function started working as soon as you updated the portal is that the triggers got synced during this time. Whenever you perform a resource deployment, configuration change or code deployment , it is necessary to sync the triggers.

    You can sync triggers in one of three ways:

    1. Restart your function app in the Azure portal.
    2. Send an HTTP POST request to https://{functionappname}.azurewebsites.net/admin/host/synctriggers?code=<API_KEY> using the master key.
    3. Send an HTTP POST request to https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP_NAME>/providers/Microsoft.Web/sites/<FUNCTION_APP_NAME>/syncfunctiontriggers?api-version=2016-08-01. Replace the placeholders with your subscription ID, resource group name, and the name of your function app.

    Sync Functions : https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/sync-functions

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.