Skip to content

Commit 0f4114f

Browse files
fix: making sure queue factory is injected (#837)
1 parent 4d9c7d5 commit 0f4114f

5 files changed

Lines changed: 21 additions & 4 deletions

File tree

application/CohortManager/src/Functions/ParticipantManagementServices/RemoveParticipant/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
services.AddSingleton<ICheckDemographic, CheckDemographic>();
1515
services.AddSingleton<ICreateParticipant, CreateParticipant>();
1616
services.AddSingleton<ICohortDistributionHandler, CohortDistributionHandler>();
17-
services.AddSingleton<IAzureQueueStorageHelper, AzureQueueStorageHelper>();
1817
services.AddHttpClient<ICheckDemographic, CheckDemographic>(client =>
1918
{
2019
client.BaseAddress = new Uri(config.DemographicURIGet);
2120
});
2221
// Register health checks
2322
services.AddBasicHealthCheck("RemoveParticipant");
2423
})
24+
.AddAzureQueues()
2525
.AddExceptionHandler()
2626
.Build();
2727

application/CohortManager/src/Functions/ParticipantManagementServices/addParticipant/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
services.AddSingleton<ICheckDemographic, CheckDemographic>();
1515
services.AddSingleton<ICreateParticipant, CreateParticipant>();
1616
services.AddSingleton<ICohortDistributionHandler, CohortDistributionHandler>();
17-
services.AddSingleton<IAzureQueueStorageHelper, AzureQueueStorageHelper>();
1817
services.AddHttpClient<ICheckDemographic, CheckDemographic>(client =>
1918
{
2019
client.BaseAddress = new Uri(config.DemographicURIGet);

application/CohortManager/src/Functions/ParticipantManagementServices/updateParticipant/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
services.AddSingleton<ICheckDemographic, CheckDemographic>();
1515
services.AddSingleton<ICreateParticipant, CreateParticipant>();
1616
services.AddSingleton<ICohortDistributionHandler, CohortDistributionHandler>();
17-
services.AddSingleton<IAzureQueueStorageHelper, AzureQueueStorageHelper>();
1817
services.AddHttpClient<ICheckDemographic, CheckDemographic>(client =>
1918
{
2019
client.BaseAddress = new Uri(config.DemographicURIGet);

application/CohortManager/src/Functions/Shared/Common/Extensions/AzureQueueExtension.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ public static IHostBuilder AddAzureQueues(this IHostBuilder hostBuilder)
88
{
99
return hostBuilder.ConfigureServices(_ =>
1010
{
11-
_.AddTransient<IAzureQueueStorageHelper,AzureQueueStorageHelper>();
11+
_.AddTransient<IAzureQueueStorageHelper, AzureQueueStorageHelper>();
12+
_.AddTransient<IQueueClientFactory, QueueClientFactory>();
1213
});
1314
}
1415

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"AppSettings": {
3+
"ConnectionStrings": {
4+
"DtOsDatabaseConnectionString": ""
5+
},
6+
"AzureSettings": {
7+
"IsCloudEnvironment": false
8+
},
9+
"FilePaths": {
10+
"Add": "TestFiles/add/",
11+
"Amended": "TestFiles/amended/",
12+
"Remove": "TestFiles/remove/"
13+
},
14+
"CloudFileStorageConnectionString": "",
15+
"BlobContainerName": "inbound",
16+
"ManagedIdentityClientId": ""
17+
}
18+
}

0 commit comments

Comments
 (0)