Skip to content

Commit e041ade

Browse files
committed
Update dependencies and improve configuration formatting
Updated project file to include new package references for Azure Storage Blobs, Azure Functions Worker, Azure WebJobs Extensions Storage, and Microsoft Extensions Logging. Reformatted BlobTrigger attribute's Connection parameter in UnzipFileBlobTrigger.cs for better readability. Updated host.json to set function timeout to 10 minutes and adjusted formatting for logging and applicationInsights settings.
1 parent 0af8ff0 commit e041ade

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

src/SamSmithNZ.LegoProcessing.Function/SamSmithNZ.LegoProcessing.Function.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
55
</PropertyGroup>
66
<ItemGroup>
7+
<PackageReference Include="Azure.Storage.Blobs" Version="12.23.0" />
8+
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
9+
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.2" />
10+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
711
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.5.0" />
812
</ItemGroup>
913
<ItemGroup>

src/SamSmithNZ.LegoProcessing.Function/UnzipFileBlobTrigger.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static class UnzipFileBlobTrigger
1010
{
1111
[FunctionName("UnzipFileBlobTrigger")]
1212
public static async Task Run([BlobTrigger("zippedparts/{name}",
13-
Connection = "storageConnectionString")]Stream myBlob, string name, ILogger log)
13+
Connection = "storageConnectionString")] Stream myBlob, string name, ILogger log)
1414
{
1515
if (myBlob != null)
1616
{
@@ -36,6 +36,5 @@ public static async Task Run([BlobTrigger("zippedparts/{name}",
3636
double elapsedSeconds = watch.Elapsed.TotalSeconds;
3737
log.LogInformation($"Zip file '" + name + "' successfully processed " + totalImages + " files from " + sourceContainerName + " to " + destinationContainerName + " in " + elapsedSeconds.ToString() + " seconds.");
3838
}
39-
4039
}
4140
}
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"version": "2.0",
3-
"logging": {
4-
"applicationInsights": {
5-
"samplingSettings": {
6-
"isEnabled": true,
7-
"excludedTypes": "Request"
8-
},
9-
"enableLiveMetricsFilters": true
10-
}
2+
"version": "2.0",
3+
"logging": {
4+
"applicationInsights": {
5+
"samplingSettings": {
6+
"isEnabled": true,
7+
"excludedTypes": "Request"
8+
},
9+
"enableLiveMetricsFilters": true
1110
}
11+
},
12+
"functionTimeout": "00:10:00"
1213
}

0 commit comments

Comments
 (0)