Loading data at regular intervals–Azure function –part 33
I need to load data at scheduled intervals – it is normal that the exchange rates are published every day.
So what options we have in Azure?
- Worker Roles
- Azure functions
After reading a lot, I decide on Azure Functions – it is the new kid on the block and battle tested. More, it has something called Durable , https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp that seems very promising
I create the function in the Azure Portal – just account that creation is not milliseconds, but seconds. And be sure that you craete under the same resource group as the previous resources.
The I create the function project template in Visual Studio. Trying to deploy from Visual Studio – after configuring , the endpoint on Azureshows error. Thinking – guess the problem – I configured the endpoint with Linux – and on my PC I have Windows. Deleting and creating another one – with Windows Containers. And now an error:”Requested feature is not available in resource group infovalutarRG. Please try using a different resource group or create a new one”
No wonder why is a DevOps thing nowadays…
Going back to Visual Studio – figuring “ Publish” has an edit – and I can see there that I can select on what OS I can publish to. => error on deploy. Investigating the logs – not understanding the error ( not enough details)
Ok – now I want to create the Azure Function from within Visual Studio. Let’s see. Now publishing works, the website show a nice interface ( your functions is up and running) . But , even if successfully deployed, does not show my function!
Trying to get the deployment profile from the Azure WebSite – says that it cannot find the function. However, it is just a time caching problem. Some seconds later it shows the function!
Moral : do not rush. Caching is a bitch nowadays.
InfovalutarAnd one hour passes...
(This is the result of 1 hour per day auto-challenge as a full cycle developer for an exchange rates application)
( You can see the sources at https://github.com/ignatandrei/InfoValutar/ )