File tree Expand file tree Collapse file tree
infrastructure/terraform/components/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ resource "aws_dynamodb_table" "supplier-configuration" {
2929 name = " volumeGroup"
3030 type = " S"
3131 }
32+
3233 // The type-index GSI allows us to query for all supplier configurations of a given type (e.g. all letter supplier configurations)
3334 global_secondary_index {
3435 name = " EntityTypeIndex"
Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ export class SupplierConfigRepository {
5353 async getSupplierAllocationsForVolumeGroup (
5454 groupId : string ,
5555 ) : Promise < SupplierAllocation [ ] > {
56+ this . log . info ( {
57+ description :
58+ "Fetching supplier allocations for volume group from database" ,
59+ groupId,
60+ } ) ;
5661 const result = await this . ddbClient . send (
5762 new QueryCommand ( {
5863 TableName : this . config . supplierConfigTableName ,
@@ -64,6 +69,12 @@ export class SupplierConfigRepository {
6469 } ,
6570 } ) ,
6671 ) ;
72+ this . log . info ( {
73+ description :
74+ "Fetched supplier allocations for volume group from database" ,
75+ groupId,
76+ count : result . Items ?. length ?? 0 ,
77+ } ) ;
6778 if ( ! result . Items ) {
6879 throw new Error (
6980 `No supplier allocations found for volume group id ${ groupId } ` ,
You can’t perform that action at this time.
0 commit comments