Skip to content

Commit 0203b2f

Browse files
authored
Merge pull request #592 from bcgov/yj
chore: performance
2 parents 1b415a3 + fd25d0c commit 0203b2f

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

helm/main/values-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ global:
33
role: f4a30d-prod
44
subPath: strdss-prod
55
env:
6-
'Serilog__MinimumLevel__Override__StrDss__Common__StrDssLogger': 'Information'
6+
'Serilog__MinimumLevel__Override__StrDss': 'Information'
77
'ASPNETCORE_ENVIRONMENT': 'Production'
88
'ENV_NAME': 'prod'
99
'APP_BASE_URL': 'https://strdata.gov.bc.ca'

helm/main/values-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ global:
33
role: f4a30d-nonprod
44
subPath: strdss-test
55
env:
6-
'Serilog__MinimumLevel__Override__StrDss__Common__StrDssLogger': 'Information'
6+
'Serilog__MinimumLevel__Override__StrDss': 'Information'
77
'ASPNETCORE_ENVIRONMENT': 'Test'
88
'ENV_NAME': 'test'
99
'APP_BASE_URL': 'https://test.strdata.gov.bc.ca'

helm/main/values-uat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ global:
33
role: f4a30d-nonprod
44
subPath: strdss-uat
55
env:
6-
'Serilog__MinimumLevel__Override__StrDss__Common__StrDssLogger': 'Information'
6+
'Serilog__MinimumLevel__Override__StrDss': 'Information'
77
'ASPNETCORE_ENVIRONMENT': 'Staging'
88
'ENV_NAME': 'uat'
99
'APP_BASE_URL': 'https://uat.strdata.gov.bc.ca'

server/StrDss.Data/Repositories/RentalListingRepository.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,19 @@ await _dbSet.AsNoTracking()
240240

241241
stopwatch.Restart();
242242

243+
var contacts = _mapper.Map<List<RentalListingContactDto>>(await _dbContext.DssRentalListingContacts
244+
.AsNoTracking()
245+
.Where(contact => listings
246+
.Select(listing => listing.RentalListingId)
247+
.Contains(contact.ContactedThroughRentalListingId))
248+
.ToListAsync());
249+
243250
foreach (var listing in listings)
244251
{
245-
await SetExtraProperties(listing);
246-
252+
listing.LastActionDtm = listing.LastActionDtm == null ? null : DateUtils.ConvertUtcToPacificTime(listing.LastActionDtm.Value);
247253
listing.Filtered = filteredIdSet.Contains(listing.RentalListingId ?? 0);
248-
254+
listing.Hosts = contacts.Where(x => x.ContactedThroughRentalListingId == listing.RentalListingId).ToList();
249255
group.NightsBookedYtdQty += listing.NightsBookedYtdQty ?? 0;
250-
251256
}
252257

253258
stopwatch.Stop();

0 commit comments

Comments
 (0)