Skip to content

SkillsFundingAgency/das-aan-hub-jobs

Repository files navigation

⛔Never push sensitive information such as client id's, secrets or keys into repositories including in the README file⛔

AAN Hub Jobs

UK Government logo

Build Status Quality Gate Status License

This azure functions solution is part of Apprentice Ambassador Network (AAN) project. Here we have background jobs in form of Azure functions that carry out periodical jobs like sending out notifications or cleaning up data.

How It Works

The notification job uses NServiceBus protocol to send a message per notification to the notification queue. The functions connects directly with the aan-hub database to get and update data.

🚀 Installation

Pre-Requisites

  • A clone of this repository
  • Storage emulator like Azurite for local config source
  • An Azure Service Bus instance with a Topic called bundle-1 (optional, only required when working on notification function)

Config

You can find the latest config file in das-employer-config repository.

In the SFA.DAS.AAN.Hub.Jobs project, if not exist already, add local.settings.json file with following content:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true;",
     "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
    "ConfigurationStorageConnectionString": "UseDevelopmentStorage=true;",
    "ConfigNames": "SFA.DAS.AANHub.Jobs",
    "EnvironmentName": "LOCAL",
    "SendNotificationsFunctionSchedule": "0 */3 * * * *",
    "MemberDataCleanupFunctionSchedule": "0 */3 * * * *",
    "SynchroniseApprenticeDetailsFunctionSchedule": "0 0 0 * * *"
  },
  "AzureWebJobs.SendNotificationsFunction.Disabled": "false",
  "AzureWebJobs.MemberDataCleanupFunction.Disabled": "false",
  "AzureWebJobs.SynchroniseApprenticeDetailsFunction.Disabled": "false"
}

When actively developing a function, it may be a good idea to disable other functions by adding "AzureWebJobs.<function-name>.Disabled": "true" to the local config, example seen above.

🔗 External Dependencies

  • The functions uses database defined in das-aan-hub-api as primary data source.
  • The notification functions depends on das-notifications Api to listen to the queue and forward the notification requests to Gov Notify to send out emails.

📦 Internal Package Dependencies

  • SFA.DAS.Notifications.Messages
  • SFA.DAS.NServiceBus
  • SFA.DAS.Configuration.AzureTableStorage

Technologies

  • .Net 8.0
  • Azure Functions V4
  • Azure Table Storage
  • NServiceBus
  • NUnit
  • Moq
  • FluentAssertions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages