Skip to content

ace540i/proj1-Azure-Functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

931 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This project contains Azure Functions for PLAC.

  • Data Import function, timer triggered
  • Tier Classification function, triggered by Service Bus Topic

Setup service bus on Azure

  1. Go to Azure portal
  2. Create a new service bus
    • choose a service name and click on create
    • choose standard on pricing tier
  3. Edit your new service bus and click on Shared access strategies and RootManageSharedAccessKey and copy the primary connection string
  4. In Plac functions project settings, paste your connection string as AzureWebJobsServiceBus setting
  5. Create a new service bus topic
  6. Create a subscription on your new topic
  7. Set TIER_CLASSIFICATION_TOPIC in project settings
  8. Make sure that topicName and subscriptionName are correct in TierClassificationFunction/function.json

Now you can test the service bus by running a post request on http://localhost:7071/admin/functions/DataImportFunction

How to manually trigger Data Import Functions

Make sure you have installed (globally) the latest the Azure Functions Core Tools. For instance:

npm i -g azure-functions-core-tools@3 --unsafe-perm true

Run the program:

npm run start

Using Postman, you need to send a POST request to the following endpoint:

Request Headers:

  • Content-Type: application/json

Request Body (select 'raw' in postman):

  • Even if it doesn't need any parameter, you have to send an empty objet.
  • By default, the function will compute last run time based on a 5 minutes frequency.
  • For test/QA purpose, you can set a custom start date, for example:
{
  "input": "2020-09-10"
}

This example will fetch all RR items modified after 2020-09-10 00:00.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors