Comments (6)
@JFulfordMS, can you provide more info like which of our packages you are using and what the version info is.
from appconfiguration.
@JFulfordMS, can you provide more info like which of our packages you are using and what the version info is.
I'm using Azure.Data.AppConfiguration 1.4.1 and AzureAppConfiguration 7.2.0.
from appconfiguration.
@JFulfordMS please follow the document below for using App Configuration in Azure Functions.
- https://learn.microsoft.com/en-us/azure/azure-app-configuration/quickstart-azure-functions-csharp
- https://learn.microsoft.com/en-us/azure/azure-app-configuration/enable-dynamic-configuration-azure-functions-csharp?tabs=in-process
from appconfiguration.
To help me make sure I understand what you're talking about, can you tell/show me how you get the Function to use a schedule defined in App Configuration?
from appconfiguration.
Sure, here is a way to test it. I set the parameter of "CdataHelper:Schedule" in an app configuration store to "*/30 * * * * *
". Then reference it in the TimerTrigger constructor. The function changes the value of the parameter to "*/5 * * * * *
" and successfully gets the updated value on the next run, but the timer still only runs every 30 seconds.
`
private readonly IConfiguration _configuration;
private readonly IConfigurationRefresher _configurationRefresher;
private readonly ConfigurationClient configurationClient;
public CdataJobFunctions(IConfiguration configuration, IConfigurationRefresherProvider refresherProvider)
{
_configuration = configuration;
_configurationRefresher = refresherProvider.Refreshers.First();
configurationClient = new ConfigurationClient(Environment.GetEnvironmentVariable("ConfigConnectionString"));
}
static HttpClient httpClient = new HttpClient();
[FunctionName("DoUpdate")]
public async Task Run([TimerTrigger("%CdataHelper:Schedule%")] TimerInfo myTimer, ILogger log)
{
log.LogInformation($"Running at: {DateTime.Now}");
log.LogInformation(_configuration["CdataHelper:Schedule"]);
var setting = configurationClient.SetConfigurationSetting("CdataHelper:Schedule", "*/5 * * * * *");
await _configurationRefresher.TryRefreshAsync();
}
`
[2024-06-03T12:10:30.006Z] Executing 'DoUpdate' (Reason='Timer fired at 2024-06-03T08:10:30.0052795-04:00', Id=84a6331c-e7c1-46f0-8ac5-e872ac43b9cc)
[2024-06-03T12:10:30.008Z] Running at: 6/3/2024 8:10:30 AM
[2024-06-03T12:10:30.008Z] */30 * * * * *
[2024-06-03T12:10:30.595Z] Executed 'DoUpdate' (Succeeded, Id=84a6331c-e7c1-46f0-8ac5-e872ac43b9cc, Duration=590ms)
[2024-06-03T12:11:00.010Z] Executing 'DoUpdate' (Reason='Timer fired at 2024-06-03T08:11:00.0094870-04:00', Id=9015ccad-a249-41f3-b1e1-cdb49d616c2d)
[2024-06-03T12:11:00.014Z] Running at: 6/3/2024 8:11:00 AM
[2024-06-03T12:11:00.015Z] */5 * * * * *
[2024-06-03T12:11:00.178Z] Executed 'DoUpdate' (Succeeded, Id=9015ccad-a249-41f3-b1e1-cdb49d616c2d, Duration=168ms)
[2024-06-03T12:11:30.011Z] Running at: 6/3/2024 8:11:30 AM
[2024-06-03T12:11:30.012Z] */5 * * * * *
[2024-06-03T12:11:30.500Z] Executed 'DoUpdate' (Succeeded, Id=39db3973-6db1-490c-99de-3381840462a1, Duration=491ms)
from appconfiguration.
The trigger uses the app setting binding expression of the Azure Functions. While your code can pick up the latest value in App Configuration, I suspect Azure Functions won't pick up the new setting without the function app being restarted (just like how app setting works in Azure Functions).
from appconfiguration.
Related Issues (20)
- Kubernetes provider fails to run on arm platform HOT 9
- Request for documentation or source code for AzureAppConfigurationPush@6 HOT 1
- How to run a show command with a wildcard for label? HOT 1
- Delayed Startup and Request Quota Metrics Incorrectly Show 100% Usage HOT 2
- 403 after adding options.SelectSnapshot HOT 15
- Missing release notes for v7.2.0 of `Microsoft.Extensions.Configuration.AzureAppConfiguration` HOT 1
- Leverage Github's "Releases" capability HOT 3
- Need an example of using FeatureManagement with a database HOT 3
- AppConfigurationPushTask: Handle null values in Configuration file HOT 2
- UseAzureAppConfiguration and AzureAppConfigurationRefreshMiddleware break context execution HOT 11
- [BUG] Springboot application failing to start due to AppConfigurationRefreshEndpoint final class from azure appconfiguration-web with actuator dependency HOT 8
- Should we allow FeatureFlag.enabled to be "true"/"false" (string type)? HOT 6
- ignore-match import mode ignored when importing json using appconfig/kvset profile HOT 9
- Azure App Configuration Not Compatible with Azure App Insights HOT 8
- DotNetFramework /WebFormApp sample doesn't refresh HOT 2
- Unable to import all keys in a json file HOT 2
- E0627: Fail to create the target ConfigMap or Secret of AzureAppConfigurationProvider no token file specified. Check pod configuration or set TokenFilePath in the options HOT 2
- Loading multiple keys not working in spring webflux application HOT 3
- Spring Boot AppConfiguration is not respecting Azure CLI credentials. HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appconfiguration.